aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-04-03 14:17:38 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:44 -0300
commitd2a360c139f857892433660a4ecf509502d6fa43 (patch)
treebf4900704ca120217afdde3ff599e16d9e80f550 /libavcodec
parentcc37640a72a96c2674d8ee93fe3b766405a027c4 (diff)
downloadffmpeg-d2a360c139f857892433660a4ecf509502d6fa43.tar.gz
pafaudio: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pafaudio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pafaudio.c b/libavcodec/pafaudio.c
index 969eb7fa97..8d0e65a829 100644
--- a/libavcodec/pafaudio.c
+++ b/libavcodec/pafaudio.c
@@ -29,12 +29,13 @@
static av_cold int paf_audio_init(AVCodecContext *avctx)
{
- if (avctx->channels != 2) {
+ if (avctx->ch_layout.nb_channels != 2) {
av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
return AVERROR_INVALIDDATA;
}
- avctx->channel_layout = AV_CH_LAYOUT_STEREO;
+ av_channel_layout_uninit(&avctx->ch_layout);
+ avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
return 0;