[FFmpeg-devel] [PATCH 098/281] mp3: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 03:55:51 EET 2022


From: Vittorio Giovara <vittorio.giovara at gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/mp3enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 3ff19da274..91874fa14e 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -175,7 +175,7 @@ static int mp3_write_xing(AVFormatContext *s)
         return -1;
     }
 
-    switch (par->channels) {
+    switch (par->ch_layout.nb_channels) {
     case 1:  channels = MPA_MONO;                                          break;
     case 2:  channels = MPA_STEREO;                                        break;
     default: av_log(s, AV_LOG_WARNING, "Unsupported number of channels, "
-- 
2.34.1



More information about the ffmpeg-devel mailing list