summaryrefslogtreecommitdiff
path: root/libavformat/cdxl.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 13:41:27 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:31 -0300
commit6d3aa08ad254c295f66220c3bbbe75bdd4e71fa2 (patch)
treea5368ed02ae7b54681a451eb85dd4128cc5c6a64 /libavformat/cdxl.c
parenteaad010f7b7057d03ec3c8048dfe519f0226f203 (diff)
downloadffmpeg-6d3aa08ad254c295f66220c3bbbe75bdd4e71fa2.tar.gz
cdxl: 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/cdxl.c')
-rw-r--r--libavformat/cdxl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c
index c42e0d3545..065148360e 100644
--- a/libavformat/cdxl.c
+++ b/libavformat/cdxl.c
@@ -178,8 +178,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_tag = 0;
st->codecpar->codec_id = AV_CODEC_ID_PCM_S8_PLANAR;
- st->codecpar->channels = channels;
- st->codecpar->channel_layout = channels == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
+ av_channel_layout_default(&st->codecpar->ch_layout, channels);
st->codecpar->sample_rate= cdxl->srate;
st->start_time = 0;
cdxl->audio_stream_index = st->index;