[MPlayer-cvslog] r21516 - trunk/libmpdemux/demux_ogg.c

reimar subversion at mplayerhq.hu
Wed Dec 6 11:46:51 CET 2006


Author: reimar
Date: Wed Dec  6 11:46:50 2006
New Revision: 21516

Modified:
   trunk/libmpdemux/demux_ogg.c

Log:
Fix memleaks caused by missing vorbis/theora_info/comment_clear calls.
Code still seems wrong to me for multiple audio tracks, since there is
only one vorbis comment/info entry for the demuxer, not one per track?


Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c	(original)
+++ trunk/libmpdemux/demux_ogg.c	Wed Dec  6 11:46:50 2006
@@ -994,6 +994,8 @@
 		   n_video - 1);
 	    if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_video_header(sh_v->bih,MSGL_V);
 	}
+	theora_comment_clear(&cc);
+	theora_info_clear(&inf);
 #   endif /* HAVE_OGGTHEORA */
     } else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) {
 	sh_a = new_sh_audio_aid(demuxer,ogg_d->num_sub, n_audio);
@@ -1621,6 +1623,8 @@
       if (ogg_d->text_langs[i]) free(ogg_d->text_langs[i]);
     free(ogg_d->text_langs);
   }
+  vorbis_info_clear(&ogg_d->vi);
+  vorbis_comment_clear(&ogg_d->vc);
   free(ogg_d);
 }
 



More information about the MPlayer-cvslog mailing list