diff mbox series

[FFmpeg-devel,140/281] sds: convert to new channel layout API

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

Commit Message

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

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

Patch

diff --git a/libavformat/sdsdec.c b/libavformat/sdsdec.c
index 073dadafbb..3b7f95421f 100644
--- a/libavformat/sdsdec.c
+++ b/libavformat/sdsdec.c
@@ -110,7 +110,8 @@  static int sds_read_header(AVFormatContext *ctx)
     avio_skip(pb, 11);
 
     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 = sample_period ? 1000000000 / sample_period : 16000;
     st->duration = (avio_size(pb) - 21) / (127) * s->size / 4;