[FFmpeg-devel] [PATCH 026/281] amv: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 03:49:48 EET 2022


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/amvenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/amvenc.c b/libavformat/amvenc.c
index fece2f49b1..28d4879b19 100644
--- a/libavformat/amvenc.c
+++ b/libavformat/amvenc.c
@@ -244,9 +244,9 @@ static void amv_write_alist(AVFormatContext *s, AVCodecParameters *par)
     /* Bodge an (incorrect) WAVEFORMATEX (+2 pad bytes) */
     tag_str = ff_start_tag(pb, "strf");
     AV_WL16(buf +  0, 1);
-    AV_WL16(buf +  2, par->channels);
+    AV_WL16(buf +  2, par->ch_layout.nb_channels);
     AV_WL32(buf +  4, par->sample_rate);
-    AV_WL32(buf +  8, par->sample_rate * par->channels * 2);
+    AV_WL32(buf +  8, par->sample_rate * par->ch_layout.nb_channels * 2);
     AV_WL16(buf + 12, 2);
     AV_WL16(buf + 14, 16);
     AV_WL16(buf + 16, 0);
-- 
2.34.1



More information about the ffmpeg-devel mailing list