aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-09-10 22:37:56 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-13 16:05:01 +0200
commitbd7d832e84598fbcce06cebb1d730dad5d3db1ce (patch)
treeed95414955b249cb4a44d02bc3e9c49a2a368eee
parent2752323046a48003d7046cc662a8835bbf65de5c (diff)
downloadffmpeg-bd7d832e84598fbcce06cebb1d730dad5d3db1ce.tar.gz
avcodec/mobiclip: add missing flush
-rw-r--r--libavcodec/mobiclip.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
index 13f0edc89d..25a7f0ed14 100644
--- a/libavcodec/mobiclip.c
+++ b/libavcodec/mobiclip.c
@@ -1393,6 +1393,14 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data,
return 0;
}
+static void mobiclip_flush(AVCodecContext *avctx)
+{
+ MobiClipContext *s = avctx->priv_data;
+
+ for (int i = 0; i < 6; i++)
+ av_frame_unref(s->pic[i]);
+}
+
static av_cold int mobiclip_close(AVCodecContext *avctx)
{
MobiClipContext *s = avctx->priv_data;
@@ -1425,6 +1433,7 @@ AVCodec ff_mobiclip_decoder = {
.priv_data_size = sizeof(MobiClipContext),
.init = mobiclip_init,
.decode = mobiclip_decode,
+ .flush = mobiclip_flush,
.close = mobiclip_close,
.capabilities = AV_CODEC_CAP_DR1,
};