diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-07 07:20:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:43 -0300 |
commit | edd7be9383f6682e54136df7611da18a05af0f96 (patch) | |
tree | fd855d7d1eb1cfa51c1774d49f36a562d3d6bb70 /libavcodec/mpc7.c | |
parent | d4b79b2e3272877714c092529d3584c61de82266 (diff) | |
download | ffmpeg-edd7be9383f6682e54136df7611da18a05af0f96.tar.gz |
mpc7: 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 'libavcodec/mpc7.c')
-rw-r--r-- | libavcodec/mpc7.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index c1a63203d6..c3ca9cfe31 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -79,8 +79,8 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) LOCAL_ALIGNED_16(uint8_t, buf, [16]); /* Musepack SV7 is always stereo */ - if (avctx->channels != 2) { - avpriv_request_sample(avctx, "%d channels", avctx->channels); + if (avctx->ch_layout.nb_channels != 2) { + avpriv_request_sample(avctx, "%d channels", avctx->ch_layout.nb_channels); return AVERROR_PATCHWELCOME; } @@ -110,7 +110,8 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) c->frames_to_skip = 0; avctx->sample_fmt = AV_SAMPLE_FMT_S16P; - avctx->channel_layout = AV_CH_LAYOUT_STEREO; + av_channel_layout_uninit(&avctx->ch_layout); + avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; ff_thread_once(&init_static_once, mpc7_init_static); |