[FFmpeg-cvslog] avfilter/vf_amplify: check if array is availabe before using it

Paul B Mahol git at videolan.org
Mon May 14 17:04:46 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon May 14 16:00:00 2018 +0200| [e3a697eda3b7c3e786a8e7dba9d4627c922f9aad] | committer: Paul B Mahol

avfilter/vf_amplify: check if array is availabe before using it

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3a697eda3b7c3e786a8e7dba9d4627c922f9aad
---

 libavfilter/vf_amplify.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c
index 7b58db065d..d1e105ef17 100644
--- a/libavfilter/vf_amplify.c
+++ b/libavfilter/vf_amplify.c
@@ -227,8 +227,10 @@ static av_cold void uninit(AVFilterContext *ctx)
     AmplifyContext *s = ctx->priv;
     int i;
 
-    for (i = 0; i < s->nb_frames; i++)
-        av_frame_free(&s->frames[i]);
+    if (s->frames) {
+        for (i = 0; i < s->nb_frames; i++)
+           av_frame_free(&s->frames[i]);
+    }
     av_freep(&s->frames);
 }
 



More information about the ffmpeg-cvslog mailing list