From: Anton Khirnov <an...@khirnov.net>

Signed-off-by: James Almer <jamr...@gmail.com>
---
 libavcodec/libtwolame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c
index a71febc91f..9e1d589a0f 100644
--- a/libavcodec/libtwolame.c
+++ b/libavcodec/libtwolame.c
@@ -76,7 +76,7 @@ static av_cold int twolame_encode_init(AVCodecContext *avctx)
     twolame_set_copyright(s->glopts, s->copyright);
     twolame_set_original(s->glopts, s->original);
 
-    twolame_set_num_channels(s->glopts, avctx->channels);
+    twolame_set_num_channels(s->glopts, avctx->ch_layout.nb_channels);
     twolame_set_in_samplerate(s->glopts, avctx->sample_rate);
     twolame_set_out_samplerate(s->glopts, avctx->sample_rate);
 
-- 
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