Commit 4c160b68 authored by Michael Niedermayer's avatar Michael Niedermayer

ff_mp4_read_dec_config_descr: check that the codec is not open

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f2ceb67e
......@@ -433,6 +433,11 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
avio_rb32(pb); /* max bitrate */
avio_rb32(pb); /* avg bitrate */
if(avcodec_is_open(st->codec)) {
av_log(fc, AV_LOG_DEBUG, "codec open in read_dec_config_descr\n");
return -1;
}
st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);
len = ff_mp4_read_descr(fc, pb, &tag);
......
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