[05/12] yadif: update frame rate

Message ID 1446573448-19335-5-git-send-email-stebbins@jetheaddev.com
State New
Headers show

Commit Message

John Stebbins Nov. 3, 2015, 5:57 p.m.
From: Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from ffmpeg commit 31619584556466e4beab98e9b04ed4c5ba0db178)
---
 libavfilter/vf_yadif.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 574eac4..f9d65e7 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -462,6 +462,10 @@  static int config_props(AVFilterLink *link)
     link->w             = link->src->inputs[0]->w;
     link->h             = link->src->inputs[0]->h;
 
+    if (s->mode & 1)
+        link->frame_rate = av_mul_q(link->src->inputs[0]->frame_rate,
+                                    (AVRational){2,1});
+
     s->csp = av_pix_fmt_desc_get(link->format);
     if (s->csp->comp[0].depth > 8) {
         s->filter_line  = filter_line_c_16bit;