[FFmpeg-devel] [PATCH 155/281] tak: convert to new channel layout API
James Almer
jamrial at gmail.com
Thu Jan 13 04:00:02 EET 2022
From: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/takdec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index cc1f049512..51e4679fd1 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -152,9 +152,12 @@ static int tak_read_header(AVFormatContext *s)
st->duration = ti.samples;
st->codecpar->bits_per_coded_sample = ti.bps;
if (ti.ch_layout)
- st->codecpar->channel_layout = ti.ch_layout;
+ av_channel_layout_from_mask(&st->codecpar->ch_layout, ti.ch_layout);
+ else {
+ st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ st->codecpar->ch_layout.nb_channels = ti.channels;
+ }
st->codecpar->sample_rate = ti.sample_rate;
- st->codecpar->channels = ti.channels;
st->start_time = 0;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
st->codecpar->extradata = buffer;
--
2.34.1
More information about the ffmpeg-devel
mailing list