Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoftworkz <softworkz@hotmail.com>2022-10-31 09:19:59 +0300
committerHaihao Xiang <haihao.xiang@intel.com>2022-11-07 05:56:44 +0300
commit55cc8312ccbc4c48f013a64b88a639df698f1aac (patch)
tree3a1e96e3b82a3856f47bbbda457a42f72287b6e0
parente154d8931e3dc9638b91934705c8b52e188f4d07 (diff)
avfilter/overlay_vaapi: remove double framesync init
Signed-off-by: softworkz <softworkz@hotmail.com>
-rw-r--r--libavfilter/vf_overlay_vaapi.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c
index cf17426b5d..66e736cce4 100644
--- a/libavfilter/vf_overlay_vaapi.c
+++ b/libavfilter/vf_overlay_vaapi.c
@@ -265,28 +265,6 @@ fail:
return err;
}
-static int overlay_vaapi_init_framesync(AVFilterContext *avctx)
-{
- OverlayVAAPIContext *ctx = avctx->priv;
- int ret, i;
-
- ctx->fs.on_event = overlay_vaapi_blend;
- ctx->fs.opaque = ctx;
- ret = ff_framesync_init(&ctx->fs, avctx, avctx->nb_inputs);
- if (ret < 0)
- return ret;
-
- for (i = 0; i < avctx->nb_inputs; i++) {
- FFFrameSyncIn *in = &ctx->fs.in[i];
- in->before = EXT_STOP;
- in->after = EXT_INFINITY;
- in->sync = i ? 1 : 2;
- in->time_base = avctx->inputs[i]->time_base;
- }
-
- return ff_framesync_configure(&ctx->fs);
-}
-
static int overlay_vaapi_config_output(AVFilterLink *outlink)
{
AVFilterContext *avctx = outlink->src;
@@ -294,10 +272,7 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
VAAPIVPPContext *vpp_ctx = avctx->priv;
int err;
- err = overlay_vaapi_init_framesync(avctx);
- if (err < 0)
- return err;
-
+ outlink->time_base = avctx->inputs[0]->time_base;
vpp_ctx->output_width = avctx->inputs[0]->w;
vpp_ctx->output_height = avctx->inputs[0]->h;
@@ -313,6 +288,10 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
if (err < 0)
return err;
+ ctx->fs.on_event = overlay_vaapi_blend;
+ ctx->fs.opaque = ctx;
+ ctx->fs.time_base = outlink->time_base;
+
return ff_framesync_configure(&ctx->fs);
}