diff mbox series

[FFmpeg-devel,10/17] avcodec/libshine: Remove dead channel count check

Message ID GV1P250MB0737415DF299521E0ED1F6858F4A9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 56f7b39456e65c31262c12ad0e03126ec29ce92d
Headers show
Series [FFmpeg-devel,01/17] avcodec/avcodec: Uninitialize AVChannelLayout before overwriting it | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 18, 2022, 8:27 p.m. UTC
This encoder has AVCodec.ch_layouts set, so that this is checked
generically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/libshine.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libshine.c b/libavcodec/libshine.c
index 621c57816a..e266229f03 100644
--- a/libavcodec/libshine.c
+++ b/libavcodec/libshine.c
@@ -44,11 +44,6 @@  static av_cold int libshine_encode_init(AVCodecContext *avctx)
 {
     SHINEContext *s = avctx->priv_data;
 
-    if (avctx->ch_layout.nb_channels <= 0 || avctx->ch_layout.nb_channels > 2){
-        av_log(avctx, AV_LOG_ERROR, "only mono or stereo is supported\n");
-        return AVERROR(EINVAL);
-    }
-
     shine_set_config_mpeg_defaults(&s->config.mpeg);
     if (avctx->bit_rate)
         s->config.mpeg.bitr = avctx->bit_rate / 1000;