diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-05-14 16:00:00 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-05-14 16:04:33 +0200 |
commit | e3a697eda3b7c3e786a8e7dba9d4627c922f9aad (patch) | |
tree | 888cc612bfa0fcb592992c40fc04a5dab8e3c5d9 /libavfilter/vf_amplify.c | |
parent | 10ed9f2b12936a51047124358dffcee7dab8f421 (diff) | |
download | ffmpeg-e3a697eda3b7c3e786a8e7dba9d4627c922f9aad.tar.gz |
avfilter/vf_amplify: check if array is availabe before using it
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_amplify.c')
-rw-r--r-- | libavfilter/vf_amplify.c | 6 |
1 files 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); } |