From e3a697eda3b7c3e786a8e7dba9d4627c922f9aad Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 14 May 2018 16:00:00 +0200 Subject: [PATCH] avfilter/vf_amplify: check if array is availabe before using it Signed-off-by: Paul B Mahol --- 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); }