diff options
-rw-r--r-- | libavcodec/atrac3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index b2052f7aa9..68ce2475b6 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -941,9 +941,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) if (q->coding_mode == STEREO) av_log(avctx, AV_LOG_DEBUG, "Normal stereo detected.\n"); - else if (q->coding_mode == JOINT_STEREO) + else if (q->coding_mode == JOINT_STEREO) { + if (avctx->channels != 2) + return AVERROR_INVALIDDATA; av_log(avctx, AV_LOG_DEBUG, "Joint stereo detected.\n"); - else { + } else { av_log(avctx, AV_LOG_ERROR, "Unknown channel coding mode %x!\n", q->coding_mode); return AVERROR_INVALIDDATA; |