You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/isom: don't free extradata before calling ff_get_extradata()
ff_get_extradata() frees any existing extradata before allocating now,
and using av_free() here leaves a dangling pointer that will result in
a double free.
Fixes a regression since 0ca33b1d4e
.
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -526,7 +526,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
|
av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
|
||||||
if (!len || (uint64_t)len > (1<<30))
|
if (!len || (uint64_t)len > (1<<30))
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
av_free(st->codecpar->extradata);
|
|
||||||
if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0)
|
if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
|
if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
|
||||||
|
Reference in New Issue
Block a user