Skip to content

Commit

Permalink
vaapi: lock display when calling vaPutSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Sep 28, 2014
1 parent 0abf356 commit f487af5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
Expand Up @@ -1832,6 +1832,7 @@ CVaapiRenderPicture* COutput::ProcessPicture(CVaapiProcessedPicture &pic)
if (!CheckSuccess(vaSyncSurface(m_config.dpy, pic.videoSurface)))
return NULL;

XLockDisplay(m_Display);
if (!CheckSuccess(vaPutSurface(m_config.dpy,
pic.videoSurface,
retPic->pixmap,
Expand All @@ -1844,6 +1845,8 @@ CVaapiRenderPicture* COutput::ProcessPicture(CVaapiProcessedPicture &pic)
{
return NULL;
}
XUnlockDisplay(m_Display);

XSync(m_config.x11dsp, false);
glEnable(m_textureTarget);
glBindTexture(m_textureTarget, retPic->texture);
Expand Down

0 comments on commit f487af5

Please sign in to comment.