Mercurial > mplayer.hg
changeset 21002:1de63b07a353
more mp_property_deinterlace simplification, patch by
Carl Eugen Hoyos [cehoyos -at- rainbow studorg tuwien ac at]
author | reimar |
---|---|
date | Sat, 18 Nov 2006 12:38:03 +0000 |
parents | 0a9d4999368b |
children | 26f723fa0a51 |
files | libvo/vo_xvmc.c mplayer.c |
diffstat | 2 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_xvmc.c Sat Nov 18 12:35:29 2006 +0000 +++ b/libvo/vo_xvmc.c Sat Nov 18 12:38:03 2006 +0000 @@ -1383,10 +1383,7 @@ *(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));
--- a/mplayer.c Sat Nov 18 12:35:29 2006 +0000 +++ b/mplayer.c Sat Nov 18 12:38:03 2006 +0000 @@ -1934,7 +1934,7 @@ } 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 @@ 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;