diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-05-21 22:48:11 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-05-21 22:48:11 +0200 |
commit | afaa39b46dbc7fa08d791e0964143bc69ae2e25b (patch) | |
tree | cfa6e0ff100e42ed98c029406d7cbdfb9de2875e | |
parent | ce4d91ba2a974addb53f4d649e50dbacc934db83 (diff) | |
download | ffmpeg-afaa39b46dbc7fa08d791e0964143bc69ae2e25b.tar.gz |
Don't overwrite codec_id with 0 in ff_mp4_read_dec_config_descr().
Fixes ticket #3660.
-rw-r--r-- | libavformat/isom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c index b34398b4f3..d768c32b63 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -441,6 +441,7 @@ static const AVCodecTag mp4_audio_types[] = { int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb) { + enum AVCodecID codec_id; int len, tag; int ret; int object_type_id = avio_r8(pb); @@ -454,7 +455,9 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext return -1; } - st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id); + codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id); + if (codec_id) + st->codec->codec_id= codec_id; av_dlog(fc, "esds object type id 0x%02x\n", object_type_id); len = ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4DecSpecificDescrTag) { |