tta: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Vittorio Giovara 2017-03-31 18:48:09 +02:00 committed by James Almer
parent 01910fec68
commit 5df73d5b4c
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ static int tta_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_TTA;
st->codecpar->channels = channels;
st->codecpar->ch_layout.nb_channels = channels;
st->codecpar->sample_rate = samplerate;
st->codecpar->bits_per_coded_sample = bps;

View File

@ -82,7 +82,7 @@ static int tta_write_header(AVFormatContext *s)
ffio_init_checksum(tta->seek_table, ff_crcEDB88320_update, UINT32_MAX);
avio_write(s->pb, "TTA1", 4);
avio_wl16(s->pb, par->extradata ? AV_RL16(par->extradata + 4) : 1);
avio_wl16(s->pb, par->channels);
avio_wl16(s->pb, par->ch_layout.nb_channels);
avio_wl16(s->pb, par->bits_per_raw_sample);
avio_wl32(s->pb, par->sample_rate);