This encoder has AVCodec.ch_layouts set, so that this is checked generically.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavcodec/libshine.c | 5 ----- 1 file changed, 5 deletions(-) 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; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".