Also silence the input file summary lines with -q.
authorRalph Giles <giles@xiph.org>
Thu, 9 Dec 2010 20:21:36 +0000 (20:21 +0000)
committerRalph Giles <giles@xiph.org>
Thu, 9 Dec 2010 20:21:36 +0000 (20:21 +0000)
I'd found these helpful for script debugging, but really it's
better for scripts to print their own version of this information.
The -q option should really mean no non-error output.

svn path=/trunk/theora/; revision=17744

examples/encoder_example.c

index 14eec20..aa864da 100644 (file)
@@ -793,8 +793,10 @@ static void id_file(char *f){
               ret=fread(buffer,1,4,test);
               if(ret<4)goto riff_err;
 
-              fprintf(stderr,"File %s is 16 bit %d channel %d Hz RIFF WAV audio.\n",
-                      f,audio_ch,audio_hz);
+              if(!quiet){
+                fprintf(stderr,"File %s is 16 bit %d channel %d Hz RIFF WAV audio.\n",
+                        f,audio_ch,audio_hz);
+              }
 
               return;
             }
@@ -928,8 +930,10 @@ static void id_file(char *f){
 
       video=test;
 
-      fprintf(stderr,"File %s is %dx%d %.02f fps %s video.\n",
-              f,pic_w,pic_h,(double)video_fps_n/video_fps_d,chroma_type);
+      if(!quiet){
+        fprintf(stderr,"File %s is %dx%d %.02f fps %s video.\n",
+                f,pic_w,pic_h,(double)video_fps_n/video_fps_d,chroma_type);
+      }
 
       return;
     }