[FFmpeg-devel] [PATCH 105/281] mtaf: convert to new channel layout API
James Almer
jamrial at gmail.com
Thu Jan 13 03:55:58 EET 2022
From: Anton Khirnov <anton at khirnov.net>
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/mtaf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/mtaf.c b/libavformat/mtaf.c
index 5da82e713b..fcca684866 100644
--- a/libavformat/mtaf.c
+++ b/libavformat/mtaf.c
@@ -54,9 +54,10 @@ static int mtaf_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_ADPCM_MTAF;
- st->codecpar->channels = 2 * stream_count;
+ st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ st->codecpar->ch_layout.nb_channels = 2 * stream_count;
st->codecpar->sample_rate = 48000;
- st->codecpar->block_align = 0x110 * st->codecpar->channels / 2;
+ st->codecpar->block_align = 0x110 * st->codecpar->ch_layout.nb_channels / 2;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
avio_seek(s->pb, 0x800, SEEK_SET);
--
2.34.1
More information about the ffmpeg-devel
mailing list