[MPlayer-cvslog] r21600 - trunk/libvo/vo_x11.c

reimar subversion at mplayerhq.hu
Tue Dec 12 19:43:11 CET 2006


Author: reimar
Date: Tue Dec 12 19:43:10 2006
New Revision: 21600

Modified:
   trunk/libvo/vo_x11.c

Log:
Use XCreateImage instead of XGetImage, this is not only more correct and
similar to the SHM case, it also eliminates the massive startup delay over
ssh (at least when you have a tiny upstream).


Modified: trunk/libvo/vo_x11.c
==============================================================================
--- trunk/libvo/vo_x11.c	(original)
+++ trunk/libvo/vo_x11.c	Tue Dec 12 19:43:10 2006
@@ -229,9 +229,10 @@
       shmemerror:
         Shmem_Flag = 0;
 #endif
-        myximage = XGetImage(mDisplay, vo_window, 0, 0,
-                             image_width, image_height, AllPlanes,
-                             ZPixmap);
+        myximage = XCreateImage(mDisplay, vinfo.visual, depth, ZPixmap,
+                             0, NULL, image_width, image_height, 8, 0);
+        myximage->data = malloc(myximage->bytes_per_line * image_height);
+        memset(myximage->data, 0, myximage->bytes_per_line * image_height);
         ImageData = myximage->data;
 #ifdef HAVE_SHM
     }
@@ -252,6 +253,7 @@
         XDestroyImage(myximage);
     }
     myximage = NULL;
+    ImageData = NULL;
 }
 
 #ifdef WORDS_BIGENDIAN



More information about the MPlayer-cvslog mailing list