aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-18 21:03:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-22 01:14:15 +0200
commit17366d6128c7c3e3781442cfd1e84e4ec5b6f20e (patch)
tree311853c39065c3938bef6d850b85d3c0ff7bc7e8 /libavcodec
parent4668ff792a509ec1eb61f3ebc133d40db3b5a420 (diff)
downloadffmpeg-17366d6128c7c3e3781442cfd1e84e4ec5b6f20e.tar.gz
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 <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegaudioenc_template.c4
1 files changed, 0 insertions, 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;