aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-18 12:38:03 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-18 12:38:03 +0000
commit582d0b7cab30048a23f5a54d4d176ab7216d9d37 (patch)
treec423ba6fca12f5189827a82a20f90eb71c4c8c1d
parent45358915e778f85f5420da88db666dac0db6aa12 (diff)
more mp_property_deinterlace simplification, patch by
Carl Eugen Hoyos [cehoyos -at- rainbow studorg tuwien ac at] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21018 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_xvmc.c5
-rw-r--r--mplayer.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index a9cc9884e8..735cd0f4ad 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -1383,10 +1383,7 @@ static int control(uint32_t request, void *data, ... )
*(int*)data = bob_deinterlace;
return VO_TRUE;
case VOCTRL_SET_DEINTERLACE:
- if (*(int*)data == -1)
- bob_deinterlace = !bob_deinterlace;
- else
- bob_deinterlace = *(int*)data;
+ bob_deinterlace = *(int*)data;
return VO_TRUE;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
diff --git a/mplayer.c b/mplayer.c
index d56bf8c36a..6386190e67 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1934,7 +1934,7 @@ static int mp_property_fullscreen(m_option_t* prop,int action,void* arg) {
}
static int mp_property_deinterlace(m_option_t* prop,int action,void* arg) {
- int toggle = -1;
+ int deinterlace;
vf_instance_t *vf;
if (!sh_video || !sh_video->vfilter) return M_PROPERTY_UNAVAILABLE;
vf = sh_video->vfilter;
@@ -1950,7 +1950,9 @@ static int mp_property_deinterlace(m_option_t* prop,int action,void* arg) {
return M_PROPERTY_OK;
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
- vf->control(vf, VFCTRL_SET_DEINTERLACE, &toggle);
+ vf->control(vf, VFCTRL_GET_DEINTERLACE, &deinterlace);
+ deinterlace = !deinterlace;
+ vf->control(vf, VFCTRL_SET_DEINTERLACE, &deinterlace);
return M_PROPERTY_OK;
}
return M_PROPERTY_NOT_IMPLEMENTED;