diff mbox series

[FFmpeg-devel,012/281] aax: convert to new channel layout API

Message ID 20220113015101.4-13-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/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
yinshiyou/makeloongarch64 warning New warnings during build
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
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/aaxdec.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c
index b08ee036ed..8eb2540407 100644
--- a/libavformat/aaxdec.c
+++ b/libavformat/aaxdec.c
@@ -279,9 +279,10 @@  static int aax_read_header(AVFormatContext *s)
         ret = ff_get_extradata(s, par, pb, extradata_size);
         if (ret < 0)
             return ret;
-        par->channels    = AV_RB8 (par->extradata + 7);
+        par->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+        par->ch_layout.nb_channels = AV_RB8 (par->extradata + 7);
         par->sample_rate = AV_RB32(par->extradata + 8);
-        if (!par->channels || !par->sample_rate)
+        if (!par->ch_layout.nb_channels || !par->sample_rate)
             return AVERROR_INVALIDDATA;
 
         avpriv_set_pts_info(st, 64, 32, par->sample_rate);
@@ -299,7 +300,7 @@  static int aax_read_packet(AVFormatContext *s, AVPacket *pkt)
     AAXContext *a = s->priv_data;
     AVCodecParameters *par = s->streams[0]->codecpar;
     AVIOContext *pb = s->pb;
-    const int size = 18 * par->channels;
+    const int size = 18 * par->ch_layout.nb_channels;
     int ret, extradata_size = 0;
     uint8_t *extradata = NULL;
     int skip = 0;