[FFmpeg-devel] [PATCH 266/281] vima: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 04:07:10 EET 2022


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

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/vima.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vima.c b/libavcodec/vima.c
index c9a81e4401..5053feda90 100644
--- a/libavcodec/vima.c
+++ b/libavcodec/vima.c
@@ -147,9 +147,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
         channel_hint[0] = ~channel_hint[0];
         channels = 2;
     }
-    avctx->channels = channels;
-    avctx->channel_layout = (channels == 2) ? AV_CH_LAYOUT_STEREO
-                                            : AV_CH_LAYOUT_MONO;
+    av_channel_layout_uninit(&avctx->ch_layout);
+    av_channel_layout_default(&avctx->ch_layout, channels);
     pcm_data[0] = get_sbits(&gb, 16);
     if (channels > 1) {
         channel_hint[1] = get_sbits(&gb, 8);
-- 
2.34.1



More information about the ffmpeg-devel mailing list