[FFmpeg-devel] [PATCH 170/281] wtv: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 04:00:17 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/wtvdec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 22e4c92565..087b44273e 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -584,11 +584,9 @@ static void parse_mpeg1waveformatex(AVStream *st)
     switch (AV_RL16(st->codecpar->extradata + 6)) {
     case 1 :
     case 2 :
-    case 4 : st->codecpar->channels       = 2;
-             st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
+    case 4 : st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
              break;
-    case 8 : st->codecpar->channels       = 1;
-             st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+    case 8 : st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
              break;
     }
 }
-- 
2.34.1



More information about the ffmpeg-devel mailing list