[FFmpeg-cvslog] avfilter/yadif: Fix time base for large denominators

Tom Boshoven git at videolan.org
Thu May 27 20:14:55 EEST 2021


ffmpeg | branch: master | Tom Boshoven <tom at jwplayer.com> | Tue May 25 11:57:08 2021 -0400| [8205f32663ec492200cdd47216719be15e92fcdb] | committer: Michael Niedermayer

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 at jwplayer.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8205f32663ec492200cdd47216719be15e92fcdb
---

 libavfilter/vf_yadif.c | 3 +--
 1 file changed, 1 insertion(+), 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;
 



More information about the ffmpeg-cvslog mailing list