[FFmpeg-cvslog] avfilter/vf_w3fdif: set frame_rate only when needed

Paul B Mahol git at videolan.org
Sat Apr 30 11:08:15 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Apr 30 10:07:51 2022 +0200| [f09712d68631d6d17237d36519f41039d151b7fe] | committer: Paul B Mahol

avfilter/vf_w3fdif: set frame_rate only when needed

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

 libavfilter/vf_w3fdif.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index 41a45ea06c..53631fd15b 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list