diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-05-22 09:41:56 +0800 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2019-05-22 17:34:18 +0800 |
commit | 98663a0bb8cb8dc0fbc7c8964ebfab9efc5c046d (patch) | |
tree | 9843f058c76e274fe22a8e6773d0ac1a9bfb2012 /libavfilter | |
parent | ecc096513c32119341a1240b67778f3e24b4293e (diff) |
lavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads
ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.
Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_lensfun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index 3b723dd2d0..089121ed08 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -465,7 +465,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) vignetting_filter_slice, &vignetting_thread_data, NULL, - FFMIN(outlink->h, ctx->graph->nb_threads)); + FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); } if (lensfun->mode & (GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION)) { @@ -493,7 +493,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) distortion_correction_filter_slice, &distortion_correction_thread_data, NULL, - FFMIN(outlink->h, ctx->graph->nb_threads)); + FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); av_frame_free(&in); return ff_filter_frame(outlink, out); |