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

Baptiste COUDURIER baptiste.coudurier
Fri Jun 16 00:52:20 CEST 2006


Hi

M?ns Rullg?rd wrote:
> 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];
> 

Indeed there is a memory leek, It will be fixed soon, since now those
tracks are fully exported to libavformat layer and will then be freed by
the common layer.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-devel mailing list