From 5df73d5b4c97113ca3a20bf18393bd54588414d8 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 31 Mar 2017 18:48:09 +0200 Subject: [PATCH] tta: convert to new channel layout API Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavformat/tta.c | 2 +- libavformat/ttaenc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tta.c b/libavformat/tta.c index 6de8c620a6..2183045940 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -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; diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c index 486f8bdd10..1938582bb3 100644 --- a/libavformat/ttaenc.c +++ b/libavformat/ttaenc.c @@ -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);