aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-07 21:49:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-07 21:49:00 +0200
commitbc773d0d422f6eb541b44d4c021831e804e103f7 (patch)
tree8969818358a69c400af6c594a9858f18d6a690e5 /libavcodec/mpc8.c
parent0049af262825254705bdbb97c28004dd7c7c2b24 (diff)
parentf5d2c597e99af218b0d4d1cf9737c7e68ee934e4 (diff)
downloadandroid_external_ffmpeg-bc773d0d422f6eb541b44d4c021831e804e103f7.tar.gz
android_external_ffmpeg-bc773d0d422f6eb541b44d4c021831e804e103f7.tar.bz2
android_external_ffmpeg-bc773d0d422f6eb541b44d4c021831e804e103f7.zip
Merge commit 'f5d2c597e99af218b0d4d1cf9737c7e68ee934e4'
* commit 'f5d2c597e99af218b0d4d1cf9737c7e68ee934e4': build: fix library installation on cygwin mpc8: add a flush function mpc8: set packet duration and stream start time instead of tracking frames Conflicts: libavformat/mpc8.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r--libavcodec/mpc8.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index d9594ec900..cb952ca039 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -428,6 +428,12 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
return c->cur_frame ? c->last_bits_used >> 3 : buf_size;
}
+static av_cold void mpc8_decode_flush(AVCodecContext *avctx)
+{
+ MPCContext *c = avctx->priv_data;
+ c->cur_frame = 0;
+}
+
AVCodec ff_mpc8_decoder = {
.name = "mpc8",
.type = AVMEDIA_TYPE_AUDIO,
@@ -435,6 +441,7 @@ AVCodec ff_mpc8_decoder = {
.priv_data_size = sizeof(MPCContext),
.init = mpc8_decode_init,
.decode = mpc8_decode_frame,
+ .flush = mpc8_decode_flush,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"),
};