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

James Almer jamrial at gmail.com
Thu Jan 13 03:49:34 EET 2022


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/aaxdec.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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;
-- 
2.34.1



More information about the ffmpeg-devel mailing list