[MPlayer-cvslog] r33522 - in trunk/libvo: vo_xv.c vo_xvmc.c

iive subversion at mplayerhq.hu
Mon May 30 00:46:52 CEST 2011


Author: iive
Date: Mon May 30 00:46:52 2011
New Revision: 33522

Log:
Fix xv/xvmc window background clearing.

Set background color only when using ck-method=background. In the
other cases clearing of the non-video image area should be done
manually. Not drawing on the video image area prevents flickering
(visible when resizing).

Modified:
   trunk/libvo/vo_xv.c
   trunk/libvo/vo_xvmc.c

Modified: trunk/libvo/vo_xv.c
==============================================================================
--- trunk/libvo/vo_xv.c	Mon May 30 00:41:52 2011	(r33521)
+++ trunk/libvo/vo_xv.c	Mon May 30 00:46:52 2011	(r33522)
@@ -168,7 +168,7 @@ static void deallocate_xvimage(int foo);
 static void resize(void)
 {
     calc_src_dst_rects(image_width, image_height, &src_rect, &dst_rect, NULL, NULL);
-    vo_x11_clearwindow_part(mDisplay, vo_window, dst_rect.width, dst_rect.height, vo_fs);
+//    vo_x11_clearwindow_part(mDisplay, vo_window, dst_rect.width, dst_rect.height, vo_fs);
     vo_xv_draw_colorkey(dst_rect.left, dst_rect.top, dst_rect.width, dst_rect.height);
 }
 
@@ -240,13 +240,13 @@ static int config(uint32_t width, uint32
             depth = 24;
         XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo);
 
-        xswa.background_pixel = 0;
+        xswa.border_pixel = 0;
+        xswamask = CWBorderPixel;
         if (xv_ck_info.method == CK_METHOD_BACKGROUND)
         {
           xswa.background_pixel = xv_colorkey;
+          xswamask |= CWBackPixel;
         }
-        xswa.border_pixel = 0;
-        xswamask = CWBackPixel | CWBorderPixel;
 
             vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight,
                    flags, CopyFromParent, "xv", title);

Modified: trunk/libvo/vo_xvmc.c
==============================================================================
--- trunk/libvo/vo_xvmc.c	Mon May 30 00:41:52 2011	(r33521)
+++ trunk/libvo/vo_xvmc.c	Mon May 30 00:46:52 2011	(r33522)
@@ -666,11 +666,12 @@ skip_surface_allocation:
         if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24;
         XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo);
 
-        xswa.background_pixel = 0;
-        if (xv_ck_info.method == CK_METHOD_BACKGROUND)
-            xswa.background_pixel = xv_colorkey;
         xswa.border_pixel     = 0;
-        xswamask = CWBackPixel | CWBorderPixel;
+        xswamask = CWBorderPixel;
+        if (xv_ck_info.method == CK_METHOD_BACKGROUND){
+            xswa.background_pixel = xv_colorkey;
+            xswamask |= CWBackPixel;
+        }
 
         vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags,
                                 CopyFromParent, "xvmc", title);


More information about the MPlayer-cvslog mailing list