summaryrefslogtreecommitdiff
path: root/libavcodec/mpc7.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/mpc7.c
parent3fca0d72105a607926adea702065b1a00adb0b5d (diff)
mpc7/8: use planar sample format
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 0d7e9dfc28..b013eeb3d5 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -94,7 +94,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;
if(vlc_initialized) return 0;
@@ -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);
bits_used = get_bits_count(&gb);
bits_avail = buf_size * 8;
@@ -340,4 +340,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 },
};