[MPlayer-cvslog] r35265 - trunk/command.c
al
subversion at mplayerhq.hu
Sun Oct 21 21:01:48 CEST 2012
Author: al
Date: Sun Oct 21 21:01:48 2012
New Revision: 35265
Log:
mp_property_deinterlace: Improve OSD feedback
Do not show wrong OSD if setting of property deinterlace
fails or is not supported by current video chain.
This was particularly misleading because if you e.g.
were using mplayer without a deinterlacing filter and
your vo didn't have deinterlacing support. The OSD
output of the property would appear like it got stuck
at "enabled".
Patch by Vicente Sendra >visenri yahoo.es<
with a few changes by me.
Modified:
trunk/command.c
Modified: trunk/command.c
==============================================================================
--- trunk/command.c Sun Oct 21 17:00:48 2012 (r35264)
+++ trunk/command.c Sun Oct 21 21:01:48 2012 (r35265)
@@ -1078,7 +1078,7 @@ static int mp_property_fullscreen(m_opti
static int mp_property_deinterlace(m_option_t *prop, int action,
void *arg, MPContext *mpctx)
{
- int deinterlace;
+ int deinterlace, deinterlace_old;
vf_instance_t *vf;
if (!mpctx->sh_video || !mpctx->sh_video->vfilter)
return M_PROPERTY_UNAVAILABLE;
@@ -1097,9 +1097,11 @@ static int mp_property_deinterlace(m_opt
return M_PROPERTY_OK;
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
- vf->control(vf, VFCTRL_GET_DEINTERLACE, &deinterlace);
- deinterlace = !deinterlace;
- vf->control(vf, VFCTRL_SET_DEINTERLACE, &deinterlace);
+ vf->control(vf, VFCTRL_GET_DEINTERLACE, &deinterlace_old);
+ deinterlace = !deinterlace_old;
+ if (vf->control(vf, VFCTRL_SET_DEINTERLACE, &deinterlace) != CONTROL_OK) {
+ deinterlace = deinterlace_old;
+ }
set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDDeinterlace,
deinterlace ? MSGTR_Enabled : MSGTR_Disabled);
return M_PROPERTY_OK;
More information about the MPlayer-cvslog
mailing list