diff options
author | Janne Grunau <janne-libav@jannau.net> | 2011-10-21 19:25:30 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-12-03 03:42:48 +0400 |
commit | fd095539d10bb440042e671f95306b16b0fec674 (patch) | |
tree | c28e329a98879823371f7b3e3f388f83f3805fab /libavcodec/mpegaudiodec.c | |
parent | 0eea212943544d40f99b05571aa7159d78667154 (diff) |
latmdec: fix audio specific config parsing
Pass the correct size in bits to mpeg4audio_get_config and add a flag
to disable parsing of the sync extension when the size is not known.
Latm with AudioMuxVersion 0 does not specify the size of the audio
specific config. Data after the audio specific config can be
misinterpreted as sync extension resulting in random and wrong configs.
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index c819bc546f..eeef470a57 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1966,7 +1966,8 @@ static int decode_init_mp3on4(AVCodecContext * avctx) return AVERROR_INVALIDDATA; } - avpriv_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size); + avpriv_mpeg4audio_get_config(&cfg, avctx->extradata, + avctx->extradata_size * 8, 1); if (!cfg.chan_config || cfg.chan_config > 7) { av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n"); return AVERROR_INVALIDDATA; |