summaryrefslogtreecommitdiff
path: root/libavcodec/mpc7.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpc7.c')
-rw-r--r--libavcodec/mpc7.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index cab4eee03d..9f3cf6c828 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -90,7 +90,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
c->IS, c->MSS, c->gapless, c->lastframelen, c->maxbands);
c->frames_to_skip = 0;
- avctx->sample_fmt = AV_SAMPLE_FMT_S16;
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
avcodec_get_frame_defaults(&c->frame);
@@ -293,7 +293,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
for(ch = 0; ch < 2; ch++)
idx_to_quant(c, &gb, bands[i].res[ch], c->Q[ch] + off);
- ff_mpc_dequantize_and_synth(c, mb, c->frame.data[0], 2);
+ ff_mpc_dequantize_and_synth(c, mb, (int16_t **)c->frame.extended_data, 2);
if(last_frame)
c->frame.nb_samples = c->lastframelen;
@@ -342,4 +342,6 @@ AVCodec ff_mpc7_decoder = {
.flush = mpc7_decode_flush,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"),
+ .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
+ AV_SAMPLE_FMT_NONE },
};