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

gmaxwell at svn.xiph.org gmaxwell at svn.xiph.org
Wed Aug 5 17:36:50 PDT 2009


Author: gmaxwell
Date: 2009-08-05 17:36:50 -0700 (Wed, 05 Aug 2009)
New Revision: 16441

Modified:
   trunk/theora/examples/player_example.c
   trunk/theora/examples/png2theora.c
Log:
png2theora.c: Roll-back the aborted attempt at clean error handling.

Modified: trunk/theora/examples/player_example.c
===================================================================
--- trunk/theora/examples/player_example.c	2009-08-05 22:32:47 UTC (rev 16440)
+++ trunk/theora/examples/player_example.c	2009-08-06 00:36:50 UTC (rev 16441)
@@ -623,14 +623,14 @@
     theora_control(&td,TH_DECCTL_SET_PPLEVEL,&pp_level,sizeof(pp_level));
     pp_inc=0;
 
-    /*{
+    {
       int arg = 0xffff;
       theora_control(&td,TH_DECCTL_SET_TELEMETRY_MBMODE,&arg,sizeof(arg));
       theora_control(&td,TH_DECCTL_SET_TELEMETRY_MV,&arg,sizeof(arg));
       theora_control(&td,TH_DECCTL_SET_TELEMETRY_QI,&arg,sizeof(arg));
       arg=10;
       theora_control(&td,TH_DECCTL_SET_TELEMETRY_BITS,&arg,sizeof(arg));
-    }*/
+    }
   }else{
     /* tear down the partial theora setup */
     theora_info_clear(&ti);

Modified: trunk/theora/examples/png2theora.c
===================================================================
--- trunk/theora/examples/png2theora.c	2009-08-05 22:32:47 UTC (rev 16440)
+++ trunk/theora/examples/png2theora.c	2009-08-06 00:36:50 UTC (rev 16441)
@@ -852,7 +852,7 @@
     do {
       if(i >= n-1) last = 1;
       if(theora_write_frame(w, h, yuv, last)) {
-        goto close;
+          fprintf(stderr,"Encoding error.\n");
         exit(1);
       }
       free(yuv);    
@@ -888,7 +888,6 @@
     th_encode_free(td);
   }
 
-close: 
   if(ogg_stream_flush(&ogg_os, &og)) {
     fwrite(og.header, og.header_len, 1, ogg_fp);
     fwrite(og.body, og.body_len, 1, ogg_fp);



More information about the commits mailing list