1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

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

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-05-14 16:00:00 +02:00
parent 10ed9f2b12
commit e3a697eda3

View File

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