1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_w3fdif: set frame_rate only when needed

This commit is contained in:
Paul B Mahol 2022-04-30 10:07:51 +02:00
parent 6018fa899f
commit f09712d686

View File

@ -325,10 +325,13 @@ static int config_input(AVFilterLink *inlink)
static int config_output(AVFilterLink *outlink)
{
AVFilterLink *inlink = outlink->src->inputs[0];
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
W3FDIFContext *s = ctx->priv;
outlink->time_base = av_mul_q(inlink->time_base, (AVRational){1, 2});
outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){2, 1});
if (s->mode)
outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){2, 1});
return 0;
}