aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-07-16 09:01:47 +0200
committerPaul B Mahol <onemda@gmail.com>2021-07-16 09:09:58 +0200
commitc4e51af5e79db28b315ec2b3bfffe3f4b2bb7640 (patch)
tree433f845e9e23f2cb54e6e89aa3cdbdfc2852bfaf
parent022e50c002e23d4f370ea38802e78b0d2247c874 (diff)
downloadffmpeg-c4e51af5e79db28b315ec2b3bfffe3f4b2bb7640.tar.gz
avfilter/vf_w3fdif: fix time base for large denominators
-rw-r--r--libavfilter/vf_w3fdif.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index c13c17e3ed..5edb826f0a 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -334,10 +334,8 @@ static int config_output(AVFilterLink *outlink)
{
AVFilterLink *inlink = outlink->src->inputs[0];
- outlink->time_base.num = inlink->time_base.num;
- outlink->time_base.den = inlink->time_base.den * 2;
- outlink->frame_rate.num = inlink->frame_rate.num * 2;
- outlink->frame_rate.den = inlink->frame_rate.den;
+ outlink->time_base = av_mul_q(inlink->time_base, (AVRational){1, 2});
+ outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){2, 1});
return 0;
}