[xiph-commits] r16476 - branches/theora-monty-post-1-1/examples

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Aug 12 14:56:37 PDT 2009


Author: xiphmont
Date: 2009-08-12 14:56:36 -0700 (Wed, 12 Aug 2009)
New Revision: 16476

Modified:
   branches/theora-monty-post-1-1/examples/encoder_example.c
Log:
Correct first-pass tear down bug (can't free vorbis setup if there was 
no vorbis setup)



Modified: branches/theora-monty-post-1-1/examples/encoder_example.c
===================================================================
--- branches/theora-monty-post-1-1/examples/encoder_example.c	2009-08-12 17:37:59 UTC (rev 16475)
+++ branches/theora-monty-post-1-1/examples/encoder_example.c	2009-08-12 21:56:36 UTC (rev 16476)
@@ -2118,14 +2118,14 @@
     y4o_free(y4o_video);
   if(y4o_audio)
     y4o_free(y4o_audio);
-  if(audio){
+  if(audio && twopass!=1){
     ogg_stream_clear(&vo);
     vorbis_block_clear(&vb);
     vorbis_dsp_clear(&vd);
     vorbis_comment_clear(&vc);
     vorbis_info_clear(&vi);
-    if(audio!=stdin)fclose(audio);
   }
+  if(audio && audio!=stdin)fclose(audio);
   if(video){
     ogg_stream_clear(&to);
     th_comment_clear(&tc);



More information about the commits mailing list