You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
atrac1: validate number of channels
This commit is contained in:
@@ -332,6 +332,11 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
||||||
|
|
||||||
|
if (avctx->channels < 1 || avctx->channels > AT1_MAX_CHANNELS) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n",
|
||||||
|
avctx->channels);
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
q->channels = avctx->channels;
|
q->channels = avctx->channels;
|
||||||
|
|
||||||
/* Init the mdct transforms */
|
/* Init the mdct transforms */
|
||||||
|
Reference in New Issue
Block a user