From e154d8931e3dc9638b91934705c8b52e188f4d07 Mon Sep 17 00:00:00 2001 From: softworkz Date: Mon, 31 Oct 2022 06:19:58 +0000 Subject: [PATCH] avfilter/overlay_vaapi: build filter params just once Signed-off-by: softworkz --- libavfilter/vf_overlay_vaapi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c index 218daf571f..cf17426b5d 100644 --- a/libavfilter/vf_overlay_vaapi.c +++ b/libavfilter/vf_overlay_vaapi.c @@ -181,10 +181,6 @@ static int overlay_vaapi_blend(FFFrameSync *fs) VARectangle overlay_region, output_region; int err; - err = overlay_vaapi_build_filter_params(avctx); - if (err < 0) - return err; - err = ff_framesync_get_frame(fs, 0, &input_main, 0); if (err < 0) return err; @@ -309,6 +305,10 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink) if (err < 0) return err; + err = overlay_vaapi_build_filter_params(avctx); + if (err < 0) + return err; + err = ff_framesync_init_dualinput(&ctx->fs, avctx); if (err < 0) return err;