1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

Call XSync after XShmAttach to avoid a possible race-condition with shmctl.

Patch from FreeBSD ports.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30260 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-01-10 14:03:10 +00:00
parent 894acafa51
commit 07f7df3208

View File

@ -1172,6 +1172,7 @@ void wsCreateImage( wsTWindow * win,int Width,int Height )
win->xImage->data=win->Shminfo.shmaddr;
win->Shminfo.readOnly=0;
XShmAttach( wsDisplay,&win->Shminfo );
XSync(wsDisplay, False);
shmctl( win->Shminfo.shmid,IPC_RMID,0 );
}
else