[MPlayer-dev-eng] [PATCH] possible vo_cvidix bug

Oded Shimon ods15 at ods15.dyndns.org
Sat Dec 24 20:02:14 CET 2005


When using vo_cvidix on matrox, colorkey setting doesn't work right, it 
seems to apply only after switching to full screen. By hacking the code I 
found that it only works if you change the colorkey BEFORE calling 
vidix_init, not after. Because it was changed after, it was only applied 
when calling vidix_init again (like to change resolution for a full screen 
switch). With this patch, it works perfectly

I am not maintainer of this and do not truely understand the change I made, 
so I will not commit this unless approoved by someone who does... So, 
someone please look over this patch...

- ods15
-------------- next part --------------
Index: libvo/vo_cvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_cvidix.c,v
retrieving revision 1.16
diff -u -r1.16 vo_cvidix.c
--- libvo/vo_cvidix.c	4 Sep 2005 20:58:39 -0000	1.16
+++ libvo/vo_cvidix.c	24 Dec 2005 18:29:51 -0000
@@ -55,11 +55,6 @@
     else y=0;
   }
   if(vo_config_count)vidix_stop();
-  if(vidix_init(swidth, sheight, x, y, vo_dwidth, vo_dheight, sformat, 32, vo_screenwidth,vo_screenheight)){
-    mp_msg(MSGT_VO, MSGL_FATAL, "Can't setup VIDIX driver: %s\n", strerror(errno));
-    return 1;
-  }
-  vidix_start();
   if(vidix_grkey_support()){
     vidix_grkey_get(&gr_key);
     gr_key.key_op = KEYS_PUT;
@@ -72,6 +67,11 @@
     else gr_key.ckey.op = CKEY_FALSE;
     vidix_grkey_set(&gr_key);
   }
+  if(vidix_init(swidth, sheight, x, y, vo_dwidth, vo_dheight, sformat, 32, vo_screenwidth,vo_screenheight)){
+    mp_msg(MSGT_VO, MSGL_FATAL, "Can't setup VIDIX driver: %s\n", strerror(errno));
+    return 1;
+  }
+  vidix_start();
   return 0;
 }
 


More information about the MPlayer-dev-eng mailing list