[FFmpeg-devel] [PATCH] libavfilter/vf_cover_rect.c: free the allocated frame

lance.lmwang at gmail.com lance.lmwang at gmail.com
Thu Jun 6 11:30:56 EEST 2019


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavfilter/vf_cover_rect.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c
index 41cd1a12b9..d63c03215d 100644
--- a/libavfilter/vf_cover_rect.c
+++ b/libavfilter/vf_cover_rect.c
@@ -196,8 +196,10 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
     CoverContext *cover = ctx->priv;
 
-    if (cover->cover_frame)
+    if (cover->cover_frame) {
         av_freep(&cover->cover_frame->data[0]);
+        av_frame_free(&cover->cover_frame);
+    }
 }
 
 static av_cold int init(AVFilterContext *ctx)
-- 
2.21.0



More information about the ffmpeg-devel mailing list