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:
authorTom Boshoven <tom@jwplayer.com>2021-05-25 18:57:08 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-05-27 18:43:40 +0300
commit8205f32663ec492200cdd47216719be15e92fcdb (patch)
tree550a45b04bd480ac42a45a834ddf1feec6a6e496 /libavfilter/vf_yadif.c
parent26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777 (diff)
avfilter/yadif: Fix time base for large denominators
This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven <tom@jwplayer.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r--libavfilter/vf_yadif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index a6942a2aa2..91cc79ecc3 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -293,8 +293,7 @@ static int config_output(AVFilterLink *outlink)
AVFilterContext *ctx = outlink->src;
YADIFContext *s = ctx->priv;
- outlink->time_base.num = ctx->inputs[0]->time_base.num;
- outlink->time_base.den = ctx->inputs[0]->time_base.den * 2;
+ outlink->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2});
outlink->w = ctx->inputs[0]->w;
outlink->h = ctx->inputs[0]->h;