[MPlayer-cvslog] CVS: main/libvo vo_xvmc.c,1.13,1.14

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Wed Feb 2 15:02:29 CET 2005


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv11961

Modified Files:
	vo_xvmc.c 
Log Message:
Query XV_COLORKEY only when listed in attribute list, fixes displaying with non overlay ports


Index: vo_xvmc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvmc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vo_xvmc.c	28 Oct 2004 01:15:52 -0000	1.13
+++ vo_xvmc.c	2 Feb 2005 14:02:26 -0000	1.14
@@ -209,31 +209,23 @@
       attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count);
       if(attributes!=NULL){
          for (i = 0; i < attrib_count; i++){
-            if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY"))
+            if (!strcmp(attributes[i].name, "XV_COLORKEY"))
             {
-               xv_atom = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False);
+               xv_atom = XInternAtom(mDisplay, "XV_COLORKEY", False);
                if(xv_atom!=None)
                {
-                  rez=XvSetPortAttribute(mDisplay, xv_port, xv_atom, 1);
-                  if(rez == Success) 
-                     keycolor_handling = AUTOPAINT_COLORKEY;
+                  rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey);
+                  if(rez == Success){
+                     keycolor = colorkey;
+                     keycolor_handling = MANUALFILL_COLORKEY;
+                   }
                }
                break;
             }
-	 }
+         }
          XFree(attributes);
       }
    }
-
-   xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);
-   if(xv_atom == None) return;
-   rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey);
-   if(rez == Success){
-      keycolor = colorkey;
-      if(keycolor_handling == AUTO_COLORKEY){
-         keycolor_handling = MANUALFILL_COLORKEY;
-      }
-   }
 }
 
 //from vo_xmga
@@ -439,7 +431,7 @@
    surface_render = NULL;
    xv_port = 0;
    number_of_surfaces = 0;
-   keycolor_handling = MANUALFILL_COLORKEY;//fixme
+   keycolor_handling = AUTO_COLORKEY;
    subpicture_alloc = 0;
    
    benchmark = 0; //disable PutImageto allow faster display than screen refresh




More information about the MPlayer-cvslog mailing list