You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter/overlay_vaapi: remove double framesync init
Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
@@ -265,28 +265,6 @@ fail:
|
|||||||
return err;
|
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)
|
static int overlay_vaapi_config_output(AVFilterLink *outlink)
|
||||||
{
|
{
|
||||||
AVFilterContext *avctx = outlink->src;
|
AVFilterContext *avctx = outlink->src;
|
||||||
@@ -294,10 +272,7 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
|
|||||||
VAAPIVPPContext *vpp_ctx = avctx->priv;
|
VAAPIVPPContext *vpp_ctx = avctx->priv;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = overlay_vaapi_init_framesync(avctx);
|
outlink->time_base = avctx->inputs[0]->time_base;
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
vpp_ctx->output_width = avctx->inputs[0]->w;
|
vpp_ctx->output_width = avctx->inputs[0]->w;
|
||||||
vpp_ctx->output_height = avctx->inputs[0]->h;
|
vpp_ctx->output_height = avctx->inputs[0]->h;
|
||||||
|
|
||||||
@@ -313,6 +288,10 @@ static int overlay_vaapi_config_output(AVFilterLink *outlink)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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);
|
return ff_framesync_configure(&ctx->fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user