From fa9a9cb0e353c54c31887842c353df96e120fee3 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 12 Dec 2006 18:43:10 +0000 Subject: 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). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21600 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 306a578f2a..09e491c613 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -229,9 +229,10 @@ static void getMyXImage(void) 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 @@ static void freeMyXImage(void) XDestroyImage(myximage); } myximage = NULL; + ImageData = NULL; } #ifdef WORDS_BIGENDIAN -- cgit v1.2.3