[FFmpeg-cvslog] avcodec/mobiclip: add missing flush
Paul B Mahol
git at videolan.org
Sun Sep 13 17:11:45 EEST 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 10 22:37:56 2020 +0200| [bd7d832e84598fbcce06cebb1d730dad5d3db1ce] | committer: Paul B Mahol
avcodec/mobiclip: add missing flush
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd7d832e84598fbcce06cebb1d730dad5d3db1ce
---
libavcodec/mobiclip.c | 9 +++++++++
1 file changed, 9 insertions(+)
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,
};
More information about the ffmpeg-cvslog
mailing list