[Ffmpeg-devel] [BUGZILLA] memory leak in mov.c

Måns Rullgård mru
Thu Jun 15 23:30:32 CEST 2006


http://bugzilla.mplayerhq.hu/show_bug.cgi?id=506 describes a memory
leak with certain MOV files.  The problem looks real to me, but I'm
not sure of the fix.  Can someone who know this file have a look?

This patch no longer applies cleanly, but should still be valid if it
is correct in the first place.

--- mov.c	2006-06-01 18:15:44.000000000 -0400
+++ mov.c.patched	2006-06-01 18:15:08.000000000 -0400
@@ -1694,6 +1694,7 @@
 #if 1
     for(i=0; i<s->nb_streams;) {
         if(s->streams[i]->codec->codec_type == CODEC_TYPE_MOV_OTHER) {/* not audio, not video, delete */
+            av_free(s->streams[i]->codec);
             av_free(s->streams[i]);
             for(j=i+1; j<s->nb_streams; j++)
                 s->streams[j-1] = s->streams[j];

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list