diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-11 12:55:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-05-04 19:24:00 +0200 |
commit | 1a4d18820d551bedcfa03b7e8ca72df87d4b5cfa (patch) | |
tree | 7b6ad465695c1bf3000b95efac11b832d0095469 | |
parent | ff73a50456b93e8d555603c093a3ebd193d0b097 (diff) | |
download | ffmpeg-1a4d18820d551bedcfa03b7e8ca72df87d4b5cfa.tar.gz |
avfilter/vf_w3fdif: deny processing small videos
Fixes #8243
(cherry picked from commit 0e68e8c93f9068596484ec8ba725586860e06fc8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavfilter/vf_w3fdif.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index bbd8db00d3..90b60a593f 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -94,6 +94,11 @@ static int config_input(AVFilterLink *inlink) s->planeheight[1] = s->planeheight[2] = FF_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 = ctx->graph->nb_threads; s->work_line = av_calloc(s->nb_threads, sizeof(*s->work_line)); |