aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-07 07:20:32 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:43 -0300
commita96c94bbd809e1bf56cab276498f7efc2869fbd2 (patch)
tree044380e14e974602fb26d670d9c62c86cc7ab416
parentedd7be9383f6682e54136df7611da18a05af0f96 (diff)
downloadffmpeg-a96c94bbd809e1bf56cab276498f7efc2869fbd2.tar.gz
mpc8: 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>
-rw-r--r--libavcodec/mpc8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index ae07093338..a0466ec135 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -169,8 +169,8 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
c->frames = 1 << (get_bits(&gb, 3) * 2);
avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
- avctx->channel_layout = (channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
- avctx->channels = channels;
+ av_channel_layout_uninit(&avctx->ch_layout);
+ av_channel_layout_default(&avctx->ch_layout, channels);
ff_thread_once(&init_static_once, mpc8_init_static);
@@ -358,7 +358,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
ff_mpc_dequantize_and_synth(c, maxband - 1,
(int16_t **)frame->extended_data,
- avctx->channels);
+ avctx->ch_layout.nb_channels);
c->cur_frame++;