From 22d6d916494498cb6a7a1f8abb5d73f0030b4f78 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 24 Oct 2018 18:30:38 +0200 Subject: [PATCH] avfilter/vf_waveform: abort early if there are no components to show --- libavfilter/vf_waveform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index b4661e0..8033628 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -3025,6 +3025,9 @@ static int config_output(AVFilterLink *outlink) comp++; } s->acomp = comp; + if (s->acomp == 0) + return AVERROR(EINVAL); + s->odesc = av_pix_fmt_desc_get(outlink->format); s->dcomp = s->odesc->nb_components; -- 2.7.4