diff mbox series

[FFmpeg-devel,011/281] aa: convert to new channel layout API

Message ID 20220113015101.4-12-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
yinshiyou/configure_loongarch64 warning Failed to run configure
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
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

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

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

Patch

diff --git a/libavformat/aadec.c b/libavformat/aadec.c
index b8a5428f1f..cd275aa2f1 100644
--- a/libavformat/aadec.c
+++ b/libavformat/aadec.c
@@ -178,7 +178,8 @@  static int aa_read_header(AVFormatContext *s)
     } else if (!strcmp(codec_name, "acelp85")) {
         st->codecpar->codec_id = AV_CODEC_ID_SIPR;
         st->codecpar->block_align = 19;
-        st->codecpar->channels = 1;
+        st->codecpar->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+        st->codecpar->ch_layout.nb_channels = 1;
         st->codecpar->sample_rate = 8500;
         st->codecpar->bit_rate = 8500;
         sti->need_parsing = AVSTREAM_PARSE_FULL_RAW;
@@ -186,7 +187,8 @@  static int aa_read_header(AVFormatContext *s)
     } else if (!strcmp(codec_name, "acelp16")) {
         st->codecpar->codec_id = AV_CODEC_ID_SIPR;
         st->codecpar->block_align = 20;
-        st->codecpar->channels = 1;
+        st->codecpar->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+        st->codecpar->ch_layout.nb_channels = 1;
         st->codecpar->sample_rate = 16000;
         st->codecpar->bit_rate = 16000;
         sti->need_parsing = AVSTREAM_PARSE_FULL_RAW;