diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index e06aa7606b..6ff3dad613 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -294,7 +294,8 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) break; case AV_CODEC_ID_ADPCM_PSXC: max_channels = 8; - if (avctx->ch_layout.nb_channels <= 0 || avctx->block_align <= 0) + if (avctx->ch_layout.nb_channels <= 0 || avctx->block_align <= 0 || + avctx->block_align % avctx->ch_layout.nb_channels) return AVERROR_INVALIDDATA; break; case AV_CODEC_ID_ADPCM_IMA_DAT4: