Browse Source

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

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n4.1
Paul B Mahol 7 years ago
parent
commit
e3a697eda3
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavfilter/vf_amplify.c

+ 4
- 2
libavfilter/vf_amplify.c View File

@@ -227,8 +227,10 @@ static av_cold void uninit(AVFilterContext *ctx)
AmplifyContext *s = ctx->priv; AmplifyContext *s = ctx->priv;
int i; 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); av_freep(&s->frames);
} }




Loading…
Cancel
Save