From 1b20853fb3e2c4879cdecf2414a2d68760df1149 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 15 Aug 2021 21:33:25 +0200 Subject: avfilter/internal: Factor out executing a filter's execute_func The current way of doing it involves writing the ctx parameter twice. Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_lensfun.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'libavfilter/vf_lensfun.c') diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index ffe81b9bc2..ea5ef5e3cf 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -461,11 +461,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) .modifier = lensfun->modifier }; - ctx->internal->execute(ctx, - vignetting_filter_slice, - &vignetting_thread_data, - NULL, - FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); + ff_filter_execute(ctx, vignetting_filter_slice, + &vignetting_thread_data, NULL, + FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); } if (lensfun->mode & (GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION)) { @@ -489,11 +487,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) .interpolation_type = lensfun->interpolation_type }; - ctx->internal->execute(ctx, - distortion_correction_filter_slice, - &distortion_correction_thread_data, - NULL, - FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); + ff_filter_execute(ctx, distortion_correction_filter_slice, + &distortion_correction_thread_data, NULL, + FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); av_frame_free(&in); return ff_filter_frame(outlink, out); -- cgit v1.2.3