[FFmpeg-devel] [PATCH 010/244] aa: convert to new channel layout API

Anton Khirnov anton at khirnov.net
Fri Dec 6 12:17:04 EET 2019


---
 libavformat/aadec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/aadec.c b/libavformat/aadec.c
index b9dd51ebfc..adf0869a65 100644
--- a/libavformat/aadec.c
+++ b/libavformat/aadec.c
@@ -188,7 +188,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;
         st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
@@ -196,7 +197,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;
         st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
-- 
2.24.0



More information about the ffmpeg-devel mailing list