diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-03 17:32:15 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-03 18:47:42 -0500 |
commit | 730280f90d36b5fd5fd400e183dfa4584b34990a (patch) | |
tree | ef7663ef1db5533e54f9539424f39330f1b720a6 /libavcodec/adxdec.c | |
parent | 3e57573fce51f219ba37a081baec10f72b45c42e (diff) | |
download | ffmpeg-730280f90d36b5fd5fd400e183dfa4584b34990a.tar.gz |
adxdec: clear eof flag and channel states when seeking
Diffstat (limited to 'libavcodec/adxdec.c')
-rw-r--r-- | libavcodec/adxdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index 4ccaf2e9f2..3f7f5f4ca1 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -165,6 +165,13 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data, return buf - avpkt->data; } +static void adx_decode_flush(AVCodecContext *avctx) +{ + ADXContext *c = avctx->priv_data; + memset(c->prev, 0, sizeof(c->prev)); + c->eof = 0; +} + AVCodec ff_adpcm_adx_decoder = { .name = "adpcm_adx", .type = AVMEDIA_TYPE_AUDIO, @@ -172,6 +179,7 @@ AVCodec ff_adpcm_adx_decoder = { .priv_data_size = sizeof(ADXContext), .init = adx_decode_init, .decode = adx_decode_frame, + .flush = adx_decode_flush, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), }; |