aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_w3fdif.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-11 12:55:13 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-11 12:55:13 +0200
commit0e68e8c93f9068596484ec8ba725586860e06fc8 (patch)
treef81eaaa7cc075bc665a75fadd81f6849aac11e3b /libavfilter/vf_w3fdif.c
parent0b567238741854b41f84f7457686b044eadfe29c (diff)
downloadffmpeg-0e68e8c93f9068596484ec8ba725586860e06fc8.tar.gz
avfilter/vf_w3fdif: deny processing small videos
Fixes #8243
Diffstat (limited to 'libavfilter/vf_w3fdif.c')
-rw-r--r--libavfilter/vf_w3fdif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index c6a6550778..b84052e8c7 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -274,6 +274,11 @@ static int config_input(AVFilterLink *inlink)
s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
+ if (inlink->h < 3) {
+ av_log(ctx, AV_LOG_ERROR, "Video of less than 3 lines is not supported\n");
+ return AVERROR(EINVAL);
+ }
+
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
s->nb_threads = ff_filter_get_nb_threads(ctx);
s->work_line = av_calloc(s->nb_threads, sizeof(*s->work_line));