diff mbox series

[FFmpeg-devel,049/281] dtshddec: convert to new channel layout API

Message ID 20220113015101.4-50-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_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson 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/dtshddec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/dtshddec.c b/libavformat/dtshddec.c
index b84588af7c..a3b3b92055 100644
--- a/libavformat/dtshddec.c
+++ b/libavformat/dtshddec.c
@@ -104,7 +104,8 @@  static int dtshd_read_header(AVFormatContext *s)
             duration *= avio_rb16(pb); // samples_per_frames
             st->duration = duration;
             avio_skip(pb, 5);
-            st->codecpar->channels = ff_dca_count_chs_for_mask(avio_rb16(pb));
+            st->codecpar->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+            st->codecpar->ch_layout.nb_channels = ff_dca_count_chs_for_mask(avio_rb16(pb));
             st->codecpar->initial_padding = avio_rb16(pb);
             avio_skip(pb, chunk_size - 21);
             break;