From 17366d6128c7c3e3781442cfd1e84e4ec5b6f20e Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 18 Sep 2022 21:03:22 +0200 Subject: [PATCH] avcodec/mpegaudioenc_template: Remove dead channel count check The encoders using this have AVCodec.ch_layouts set, so that this is checked generically. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudioenc_template.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/mpegaudioenc_template.c b/libavcodec/mpegaudioenc_template.c index 67b8069102..396e8a4899 100644 --- a/libavcodec/mpegaudioenc_template.c +++ b/libavcodec/mpegaudioenc_template.c @@ -82,10 +82,6 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx) int i, v, table; float a; - if (channels <= 0 || channels > 2){ - av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed in mp2\n", channels); - return AVERROR(EINVAL); - } bitrate = bitrate / 1000; s->nb_channels = channels; avctx->frame_size = MPA_FRAME_SIZE;