aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-15 17:59:43 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-15 17:59:43 +0200
commitf2598484b8301d8836ec34c45a9003d99c2bd606 (patch)
treeedd08deb5fbe2d9d4f86004c5084a8d72b43ff68
parentec9d48da195950bafce32ff8f5f8e10c4440daca (diff)
downloadffmpeg-f2598484b8301d8836ec34c45a9003d99c2bd606.tar.gz
avfilter/vf_bm3d: make sure nb_jobs is at least 1
-rw-r--r--libavfilter/vf_bm3d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c
index 3196b63884..a602283e38 100644
--- a/libavfilter/vf_bm3d.c
+++ b/libavfilter/vf_bm3d.c
@@ -748,7 +748,7 @@ static int filter_frame(AVFilterContext *ctx, AVFrame **out, AVFrame *in, AVFram
av_frame_copy_props(*out, in);
for (p = 0; p < s->nb_planes; p++) {
- const int nb_jobs = FFMIN(s->nb_threads, s->planeheight[p] / s->block_size);
+ const int nb_jobs = FFMAX(1, FFMIN(s->nb_threads, s->planeheight[p] / s->block_size));
ThreadData td;
if (!((1 << p) & s->planes) || ctx->is_disabled) {