diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-09 13:26:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-09 13:26:20 +0100 |
commit | 13451f5520ce6b0afde861b2285dda659f8d4fb4 (patch) | |
tree | a051881dbde29a4caa191a392ff11e89962a779e | |
parent | 5ee008e01d5a50d976b5f2a4abd6932185672d91 (diff) | |
download | ffmpeg-13451f5520ce6b0afde861b2285dda659f8d4fb4.tar.gz |
atrac3dec: Check coding mode against channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/atrac3.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index abc2927840..101a8873a3 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -916,6 +916,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } + if (q->coding_mode == JOINT_STEREO && avctx->channels < 2) { + av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n"); + return AVERROR_INVALIDDATA; + } + /* Check the extradata */ if (version != 4) { |