mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 19:18:01 +00:00
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
This commit is contained in:
parent
dc2cabd003
commit
2f412421e8
@ -528,6 +528,7 @@ int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom)
|
|||||||
dprintf(fc, "Specific MPEG4 header len=%d\n", len);
|
dprintf(fc, "Specific MPEG4 header len=%d\n", len);
|
||||||
if((uint64_t)len > (1<<30))
|
if((uint64_t)len > (1<<30))
|
||||||
return -1;
|
return -1;
|
||||||
|
av_free(st->codec->extradata);
|
||||||
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!st->codec->extradata)
|
if (!st->codec->extradata)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user