]> git.sesse.net Git - vlc/commitdiff
Turn on XVideo color key automatic painting (fix #4643)
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 7 Oct 2011 17:47:26 +0000 (20:47 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 7 Oct 2011 20:16:33 +0000 (23:16 +0300)
modules/video_output/xcb/xvideo.c

index b69ecbdfd7466a3564312e2fb9c9a1ca754896d9..f732a463d0eaedec2fad0ed81ddd86ba1a12908d 100644 (file)
@@ -513,7 +513,7 @@ static int Open (vlc_object_t *obj)
         msg_Err (vd, "no available XVideo adaptor");
         goto error;
     }
-    else
+    /* Compute video (window) placement within the parent window */
     {
         xcb_map_window (conn, p_sys->window);
 
@@ -539,6 +539,15 @@ static int Open (vlc_object_t *obj)
     xcb_create_gc (conn, p_sys->gc, p_sys->window, 0, NULL);
     msg_Dbg (vd, "using X11 graphic context 0x%08"PRIx32, p_sys->gc);
 
+    /* Disable color keying if applicable */
+    {
+        xcb_intern_atom_reply_t *r =
+            xcb_intern_atom_reply (conn,
+                xcb_intern_atom (conn, 1, 21, "XV_AUTOPAINT_COLORKEY"), NULL);
+        if (r != NULL && r->atom != 0)
+            xcb_xv_set_port_attribute(conn, p_sys->port, r->atom, 1);
+    }
+
     /* Create cursor */
     p_sys->cursor = CreateBlankCursor (conn, screen);