[MPlayer-dev-eng] Change for "D to deinterlace"

Carl Eugen Hoyos cehoyos at rainbow.studorg.tuwien.ac.at
Sat Nov 18 12:47:00 CET 2006


Michael proposed the attached change

Greetings, Carl Eugen
-------------- next part --------------
Index: mplayer.c
===================================================================
--- mplayer.c   (Revision 21005)
+++ mplayer.c   (Arbeitskopie)
@@ -1924,7 +1924,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;
@@ -1940,7 +1940,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;
Index: libvo/vo_xvmc.c
===================================================================
--- libvo/vo_xvmc.c     (Revision 21005)
+++ libvo/vo_xvmc.c     (Arbeitskopie)
@@ -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));



More information about the MPlayer-dev-eng mailing list