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); }