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.rheinha...@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

_______________________________________________
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".

Reply via email to