diff mbox series

[FFmpeg-devel,073/281] hcom: convert to new channel layout API

Message ID 20220113015101.4-74-jamrial@gmail.com
State New
Headers show
Series New channel layout API | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

James Almer Jan. 13, 2022, 1:50 a.m. UTC
From: Anton Khirnov <anton@khirnov.net>

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/hcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/hcom.c b/libavformat/hcom.c
index b7fb7314c8..579f0b707e 100644
--- a/libavformat/hcom.c
+++ b/libavformat/hcom.c
@@ -62,7 +62,8 @@  static int hcom_read_header(AVFormatContext *s)
         return AVERROR(ENOMEM);
 
     st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
-    st->codecpar->channels    = 1;
+    st->codecpar->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+    st->codecpar->ch_layout.nb_channels = 1;
     st->codecpar->sample_rate = 22050 / divisor;
     st->codecpar->codec_id    = AV_CODEC_ID_HCOM;
     st->codecpar->bits_per_coded_sample = 8;