diff options
author | James Almer <jamrial@gmail.com> | 2019-01-28 13:16:32 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-01-28 18:14:08 -0300 |
commit | 286e58bb1f2d14bc2652430413987554e4e71668 (patch) | |
tree | 61e9b92c3fa358deaf52d8e9cae2e073bfbbceab /libavcodec/arbc.c | |
parent | 483d02918872fb382e7d630b9ef5b2551283c2f4 (diff) |
avcodec/arbc: clear decoder state when seeking
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/arbc.c')
-rw-r--r-- | libavcodec/arbc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c index 01a146f934..4558304f12 100644 --- a/libavcodec/arbc.c +++ b/libavcodec/arbc.c @@ -181,6 +181,13 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } +static void decode_flush(AVCodecContext *avctx) +{ + ARBCContext *s = avctx->priv_data; + + av_frame_unref(s->prev_frame); +} + static av_cold int decode_close(AVCodecContext *avctx) { ARBCContext *s = avctx->priv_data; @@ -198,6 +205,7 @@ AVCodec ff_arbc_decoder = { .priv_data_size = sizeof(ARBCContext), .init = decode_init, .decode = decode_frame, + .flush = decode_flush, .close = decode_close, .capabilities = AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, |