[xiph-commits] r11532 - trunk/vorbis-tools/oggdec

msmith at svn.xiph.org msmith at svn.xiph.org
Wed Jun 7 01:53:01 PDT 2006


Author: msmith
Date: 2006-06-07 01:52:59 -0700 (Wed, 07 Jun 2006)
New Revision: 11532

Modified:
   trunk/vorbis-tools/oggdec/oggdec.c
Log:
Free output filename when autogenerated, as reported on-list.
Initialise some variables to avoid warnings.


Modified: trunk/vorbis-tools/oggdec/oggdec.c
===================================================================
--- trunk/vorbis-tools/oggdec/oggdec.c	2006-06-06 23:02:50 UTC (rev 11531)
+++ trunk/vorbis-tools/oggdec/oggdec.c	2006-06-07 08:52:59 UTC (rev 11532)
@@ -226,7 +226,7 @@
     int ret;
     ogg_int64_t length = 0;
     ogg_int64_t done = 0;
-    int size;
+    int size = 0;
     int seekable = 0;
     int percent = 0;
     int channels;
@@ -243,7 +243,7 @@
 
     if(ov_seekable(&vf)) {
         int link;
-        int chainsallowed;
+        int chainsallowed = 0;
         for(link = 0; link < ov_streams(&vf); link++) {
             if(ov_info(&vf, link)->channels == channels && 
                     ov_info(&vf, link)->rate == samplerate)
@@ -419,6 +419,9 @@
                 return 1;
             }
 
+            if(!outfilename)
+                free(out);
+
             fclose(outfile);
         }
     }



More information about the commits mailing list