]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_signalstats.c
Merge commit 'eedbeb4c2737f28844157fae4bd87ed42a61bb1d'
[ffmpeg] / libavfilter / vf_signalstats.c
index 6796af80799900c56b985423c1ac006502c44576..22a1db196f0e3ab7a5ea016f186c7a47686487f2 100644 (file)
@@ -185,7 +185,7 @@ static int config_props(AVFilterLink *outlink)
     s->fs = inlink->w * inlink->h;
     s->cfs = s->chromaw * s->chromah;
 
-    s->nb_jobs   = FFMAX(1, FFMIN(inlink->h, ctx->graph->nb_threads));
+    s->nb_jobs   = FFMAX(1, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
     s->jobs_rets = av_malloc_array(s->nb_jobs, sizeof(*s->jobs_rets));
     if (!s->jobs_rets)
         return AVERROR(ENOMEM);
@@ -602,7 +602,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in)
     }
 
     ctx->internal->execute(ctx, compute_sat_hue_metrics8, &td_huesat,
-                           NULL, FFMIN(s->chromah, ctx->graph->nb_threads));
+                           NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx)));
 
     // Calculate luma histogram and difference with previous frame or field.
     for (j = 0; j < link->h; j++) {
@@ -820,7 +820,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in)
     }
 
     ctx->internal->execute(ctx, compute_sat_hue_metrics16, &td_huesat,
-                           NULL, FFMIN(s->chromah, ctx->graph->nb_threads));
+                           NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx)));
 
     // Calculate luma histogram and difference with previous frame or field.
     memset(s->histy, 0, (1 << s->depth) * sizeof(*s->histy));