aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-05 00:46:53 +0000
committerGravatar michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-05 00:46:53 +0000
commit339929d7655d97ce0153a1a8ffb68283f8ef4475 (patch)
treea11e0bc8dc6d1ca7d0be71b6c977bb1a7c496a7e /libmpcodecs
parent3f3f9eaae59a910958620a9881ba8f0bf6a63b42 (diff)
skip first (green) frame
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22134 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_yadif.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c
index 7f505cf27e..10cd8b37c4 100644
--- a/libmpcodecs/vf_yadif.c
+++ b/libmpcodecs/vf_yadif.c
@@ -411,9 +411,13 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
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 @@ static int control(struct vf_instance_s* vf, int request, void* data){
*(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);