diff options
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r-- | libavcodec/mpc8.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index cb30b2c28b..64d19193b0 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -139,7 +139,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 = (channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; avctx->channels = channels; @@ -413,7 +413,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++; @@ -446,4 +447,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 }, }; |