[FFmpeg-devel] [PATCH 02/17] avcodec/encode: Remove dead deprecated check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Sep 18 23:27:42 EEST 2022


The wrapper for the legacy channel layout API already sets
AVCodecContext.channels based upon AVCodecContext.channel_layout
if the latter is set while the former is unset.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/encode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index ade4d458e7..2168b88ea8 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -629,8 +629,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
                    buf, channels, avctx->channels);
             return AVERROR(EINVAL);
         }
-    } else if (avctx->channel_layout) {
-        avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
     }
     if (avctx->channels < 0) {
         av_log(avctx, AV_LOG_ERROR, "Specified number of channels %d is not supported\n",
-- 
2.34.1



More information about the ffmpeg-devel mailing list