[xiph-commits] r17744 - trunk/theora/examples

giles at svn.xiph.org giles at svn.xiph.org
Thu Dec 9 12:21:36 PST 2010


Author: giles
Date: 2010-12-09 12:21:36 -0800 (Thu, 09 Dec 2010)
New Revision: 17744

Modified:
   trunk/theora/examples/encoder_example.c
Log:
Also silence the input file summary lines with -q.

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.

Modified: trunk/theora/examples/encoder_example.c
===================================================================
--- trunk/theora/examples/encoder_example.c	2010-12-09 03:38:36 UTC (rev 17743)
+++ trunk/theora/examples/encoder_example.c	2010-12-09 20:21:36 UTC (rev 17744)
@@ -793,8 +793,10 @@
               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 @@
 
       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;
     }



More information about the commits mailing list