summaryrefslogtreecommitdiffstats
path: root/libavcodec/imm4.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-04-13 18:32:58 +0200
committerPaul B Mahol <onemda@gmail.com>2019-04-13 18:32:58 +0200
commita208c277f811a8495699b1f9b5770d6ace5582d4 (patch)
tree588b0a032d0b131048ec568a58fc61f701dfcc7a /libavcodec/imm4.c
parent16f7c1f2911c5cd01ed0e38d4d34ba519950e893 (diff)
downloadffmpeg-streaming-a208c277f811a8495699b1f9b5770d6ace5582d4.zip
ffmpeg-streaming-a208c277f811a8495699b1f9b5770d6ace5582d4.tar.gz
avcodec/imm4: flush prev_frame after seeking
Diffstat (limited to 'libavcodec/imm4.c')
-rw-r--r--libavcodec/imm4.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c
index 1a4d0de..d92bc30 100644
--- a/libavcodec/imm4.c
+++ b/libavcodec/imm4.c
@@ -523,6 +523,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
}
+static void decode_flush(AVCodecContext *avctx)
+{
+ IMM4Context *s = avctx->priv_data;
+
+ av_frame_unref(s->prev_frame);
+}
+
static av_cold int decode_close(AVCodecContext *avctx)
{
IMM4Context *s = avctx->priv_data;
@@ -543,6 +550,7 @@ AVCodec ff_imm4_decoder = {
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
+ .flush = decode_flush,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP,
OpenPOWER on IntegriCloud