From 1a3459033dc94d3f6e1b7e7c4de227fda369f2bf Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 28 Aug 2012 09:11:45 -0400 Subject: mpc7/8: use planar sample format --- libavcodec/mpc8.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libavcodec/mpc8.c') diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 79225c4275..91e228b07c 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -135,7 +135,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) c->MSS = get_bits1(&gb); c->frames = 1 << (get_bits(&gb, 3) * 2); - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avctx->sample_fmt = AV_SAMPLE_FMT_S16P; avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; if(vlc_initialized) return 0; @@ -405,7 +405,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data, } } - ff_mpc_dequantize_and_synth(c, maxband - 1, c->frame.data[0], + ff_mpc_dequantize_and_synth(c, maxband - 1, + (int16_t **)c->frame.extended_data, avctx->channels); c->cur_frame++; @@ -438,4 +439,6 @@ AVCodec ff_mpc8_decoder = { .flush = mpc8_decode_flush, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, + AV_SAMPLE_FMT_NONE }, }; -- cgit v1.2.3