avfilter/vf_mix: use time_base from framesync
This commit is contained in:
@@ -217,7 +217,6 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
{
|
{
|
||||||
AVFilterContext *ctx = outlink->src;
|
AVFilterContext *ctx = outlink->src;
|
||||||
MixContext *s = ctx->priv;
|
MixContext *s = ctx->priv;
|
||||||
AVRational time_base = ctx->inputs[0]->time_base;
|
|
||||||
AVRational frame_rate = ctx->inputs[0]->frame_rate;
|
AVRational frame_rate = ctx->inputs[0]->frame_rate;
|
||||||
AVFilterLink *inlink = ctx->inputs[0];
|
AVFilterLink *inlink = ctx->inputs[0];
|
||||||
int height = ctx->inputs[0]->h;
|
int height = ctx->inputs[0]->h;
|
||||||
@@ -252,7 +251,6 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
|
|
||||||
outlink->w = width;
|
outlink->w = width;
|
||||||
outlink->h = height;
|
outlink->h = height;
|
||||||
outlink->time_base = time_base;
|
|
||||||
outlink->frame_rate = frame_rate;
|
outlink->frame_rate = frame_rate;
|
||||||
|
|
||||||
if ((ret = ff_framesync_init(&s->fs, ctx, s->nb_inputs)) < 0)
|
if ((ret = ff_framesync_init(&s->fs, ctx, s->nb_inputs)) < 0)
|
||||||
@@ -271,7 +269,10 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
in[i].after = (s->duration == 1 || (s->duration == 2 && i == 0)) ? EXT_STOP : EXT_INFINITY;
|
in[i].after = (s->duration == 1 || (s->duration == 2 && i == 0)) ? EXT_STOP : EXT_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ff_framesync_configure(&s->fs);
|
ret = ff_framesync_configure(&s->fs);
|
||||||
|
outlink->time_base = s->fs.time_base;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_cold void uninit(AVFilterContext *ctx)
|
static av_cold void uninit(AVFilterContext *ctx)
|
||||||
|
Reference in New Issue
Block a user