diff mbox series

[FFmpeg-devel,11/17] avcodec/libspeexenc: Remove dead channel count check

Message ID GV1P250MB0737B95D875617E3D1EC89EE8F4A9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 4668ff792a509ec1eb61f3ebc133d40db3b5a420
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/libspeexenc.c | 7 -------
 1 file changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 8d2c6347fa..2191e7dac7 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -152,13 +152,6 @@  static av_cold int encode_init(AVCodecContext *avctx)
     int header_size;
     int32_t complexity;
 
-    /* channels */
-    if (channels < 1 || channels > 2) {
-        av_log(avctx, AV_LOG_ERROR, "Invalid channels (%d). Only stereo and "
-               "mono are supported\n", channels);
-        return AVERROR(EINVAL);
-    }
-
     /* sample rate and encoding mode */
     switch (avctx->sample_rate) {
     case  8000: mode = speex_lib_get_mode(SPEEX_MODEID_NB);  break;