[FFmpeg-cvslog] avfilter/vf_waveform: abort early if there are no components to show

Paul B Mahol git at videolan.org
Wed Oct 24 19:34:27 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct 24 18:30:38 2018 +0200| [22d6d916494498cb6a7a1f8abb5d73f0030b4f78] | committer: Paul B Mahol

avfilter/vf_waveform: abort early if there are no components to show

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22d6d916494498cb6a7a1f8abb5d73f0030b4f78
---

 libavfilter/vf_waveform.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index b4661e021f..8033628407 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;
 



More information about the ffmpeg-cvslog mailing list