summaryrefslogtreecommitdiff
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-08-28 09:11:45 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-10-01 13:42:44 -0400
commit1a3459033dc94d3f6e1b7e7c4de227fda369f2bf (patch)
treebae054f19164d46ba265fba3f21da2bc4feab65e /libavcodec/mpc8.c
parent3fca0d72105a607926adea702065b1a00adb0b5d (diff)
mpc7/8: use planar sample format
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r--libavcodec/mpc8.c7
1 files changed, 5 insertions, 2 deletions
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 },
};