yadif: update frame rate
[ffmpeg.git] / libavfilter / vf_yadif.c
index afbd900..215c764 100644 (file)
@@ -405,11 +405,16 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
 
 static int config_props(AVFilterLink *link)
 {
+    YADIFContext *yadif = link->src->priv;
+
     link->time_base.num = link->src->inputs[0]->time_base.num;
     link->time_base.den = link->src->inputs[0]->time_base.den * 2;
     link->w             = link->src->inputs[0]->w;
     link->h             = link->src->inputs[0]->h;
 
+    if(yadif->mode&1)
+        link->frame_rate = av_mul_q(link->src->inputs[0]->frame_rate, (AVRational){2,1});
+
     return 0;
 }