diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 19:44:21 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 15:42:38 +0300 |
commit | 30b46fb9802726d2a0dbfe44978e5a0cd3f71207 (patch) | |
tree | 8f8bf6eaa67e2d99b6cc6fa3f9fcfe196ffe9bca /libavformat/takdec.c | |
parent | 9ff843eb4a5ca4c82bd42c737eefbb29d5d26084 (diff) |
tak: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/takdec.c')
-rw-r--r-- | libavformat/takdec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/takdec.c b/libavformat/takdec.c index cc1f049512..08f6e6a257 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -152,9 +152,13 @@ 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 { + av_channel_layout_uninit(&st->codecpar->ch_layout); + 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; |