Commit 2f412421 authored by Martin Storsjö's avatar Martin Storsjö

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
parent dc2cabd0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment