# HG changeset patch # User reimar # Date 1165948990 0 # Node ID 3ddf91e141a379e7ae78dd0615e52e4a1605274a # Parent f746c28a324c176b65404b45dcec7f9bd21a8e0f 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). diff -r f746c28a324c -r 3ddf91e141a3 libvo/vo_x11.c --- a/libvo/vo_x11.c Tue Dec 12 09:40:49 2006 +0000 +++ b/libvo/vo_x11.c Tue Dec 12 18:43:10 2006 +0000 @@ -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