1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

tak: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Vittorio Giovara 2017-03-31 18:44:21 +02:00 committed by James Almer
parent 9ff843eb4a
commit 30b46fb980

View File

@ -152,9 +152,13 @@ static int tak_read_header(AVFormatContext *s)
st->duration = ti.samples; st->duration = ti.samples;
st->codecpar->bits_per_coded_sample = ti.bps; st->codecpar->bits_per_coded_sample = ti.bps;
if (ti.ch_layout) 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->sample_rate = ti.sample_rate;
st->codecpar->channels = ti.channels;
st->start_time = 0; st->start_time = 0;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
st->codecpar->extradata = buffer; st->codecpar->extradata = buffer;