mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
45358915e7
commit
582d0b7cab
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue