diff mbox series

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

Message ID 20220113020026.590-22-jamrial@gmail.com
State New
Headers show
Series New channel layout API
Related show

Commit Message

James Almer Jan. 13, 2022, 2 a.m. UTC
From: Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/wtvdec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

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;
     }
 }