]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_perspective.c
Merge commit 'e48746deec48e9ff195841bc3266b4e153a878cd'
[ffmpeg] / libavfilter / vf_perspective.c
index 2b5afcea3517720ca71766024a094fcb8e926761..d590cfa48d7b026a2eaac4cd7fc4dafb22d68008 100644 (file)
@@ -135,8 +135,8 @@ static int calc_persp_luts(AVFilterContext *ctx, AVFilterLink *inlink)
     double (*ref)[2]      = s->ref;
 
     double values[VAR_VARS_NB] = { [VAR_W] = inlink->w, [VAR_H] = inlink->h,
-                                   [VAR_IN] = inlink->frame_count  + 1,
-                                   [VAR_ON] = outlink->frame_count + 1 };
+                                   [VAR_IN] = inlink->frame_count_out + 1,
+                                   [VAR_ON] = outlink->frame_count_in + 1 };
     const int h = values[VAR_H];
     const int w = values[VAR_W];
     double x0, x1, x2, x3, x4, x5, x6, x7, x8, q;
@@ -478,7 +478,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
                          .h = s->height[plane],
                          .hsub = hsub,
                          .vsub = vsub };
-        ctx->internal->execute(ctx, s->perspective, &td, NULL, FFMIN(td.h, ctx->graph->nb_threads));
+        ctx->internal->execute(ctx, s->perspective, &td, NULL, FFMIN(td.h, ff_filter_get_nb_threads(ctx)));
     }
 
     av_frame_free(&frame);