From 582d0b7cab30048a23f5a54d4d176ab7216d9d37 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 18 Nov 2006 12:38:03 +0000 Subject: [PATCH] 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 --- libvo/vo_xvmc.c | 5 +---- mplayer.c | 6 ++++-- 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;