[SCM] libav/experimental: movdec: Free the previous extradata

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:17:03 UTC 2013


The following commit has been merged in the experimental branch:
commit 2f412421e8bb1927fcd866777dfedf223c9dfdfb
Author: Martin Storsjö <martin at martin.st>
Date:   Tue Oct 5 21:36:30 2010 +0000

    movdec: Free the previous extradata
    
    If multiple stsd atoms are parsed for the same stream, the old
    extradata would be leaked.
    
    Originally committed as revision 25360 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8c65f4b..4eea795 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -528,6 +528,7 @@ int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom)
             dprintf(fc, "Specific MPEG4 header len=%d\n", len);
             if((uint64_t)len > (1<<30))
                 return -1;
+            av_free(st->codec->extradata);
             st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
             if (!st->codec->extradata)
                 return AVERROR(ENOMEM);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list