]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_bm3d: fix possible infinite loop
authorPaul B Mahol <onemda@gmail.com>
Sun, 13 Oct 2019 16:16:19 +0000 (18:16 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 13 Oct 2019 16:16:19 +0000 (18:16 +0200)
libavfilter/vf_bm3d.c

index 04cc19ccee24bf8a5f3928a3e4b716c26d566b66..3196b63884cb4a2b611f0f5203516702273cad9d 100644 (file)
@@ -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_step);
+        const int nb_jobs = FFMIN(s->nb_threads, s->planeheight[p] / s->block_size);
         ThreadData td;
 
         if (!((1 << p) & s->planes) || ctx->is_disabled) {