mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 21:40:34 +00:00
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f2ceb67e5b
commit
4c160b68cc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user