changeset 22116:c90733d6a870

skip first (green) frame
author michael
date Mon, 05 Feb 2007 00:46:53 +0000
parents cc925b0d1335
children 15bb9c161e94
files libmpcodecs/vf_yadif.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_yadif.c	Sun Feb 04 19:18:26 2007 +0000
+++ b/libmpcodecs/vf_yadif.c	Mon Feb 05 00:46:53 2007 +0000
@@ -411,9 +411,13 @@
     vf->priv->buffered_i = 0;
     vf->priv->buffered_pts = pts;
 
-    return vf->priv->do_deinterlace?
-           continue_buffered_image(vf):
-           vf_next_put_image(vf, mpi, pts);
+    if(vf->priv->do_deinterlace == 0)
+        return vf_next_put_image(vf, mpi, pts);
+    else if(vf->priv->do_deinterlace == 1){
+        vf->priv->do_deinterlace= 2;
+        return 0;
+    }else
+        continue_buffered_image(vf);
 }
 
 static int continue_buffered_image(struct vf_instance_s *vf)
@@ -478,7 +482,7 @@
         *(int*)data = vf->priv->do_deinterlace;
         return CONTROL_OK;
       case VFCTRL_SET_DEINTERLACE:
-        vf->priv->do_deinterlace = *(int*)data;
+        vf->priv->do_deinterlace = 2*!!*(int*)data;
         return CONTROL_OK;
     }
     return vf_next_control (vf, request, data);