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
This commit is contained in:
reimar 2006-12-12 18:43:10 +00:00
parent a0d9867099
commit fa9a9cb0e3
1 changed files with 5 additions and 3 deletions

View File

@ -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