avformat/isom: return proper error values in ff_mp4_read_dec_config_descr

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/272/head
James Almer 7 years ago
parent 8794e0c037
commit 08b294bf5f
  1. 2
      libavformat/isom.c

@ -524,7 +524,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (tag == MP4DecSpecificDescrTag) { if (tag == MP4DecSpecificDescrTag) {
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 -1; return AVERROR_INVALIDDATA;
av_free(st->codecpar->extradata); 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;

Loading…
Cancel
Save