Skip to content
Snippets Groups Projects
Commit 8f46480f authored by Tristan Matthews's avatar Tristan Matthews Committed by Emmanuel Lepage Vallee
Browse files

Fix SHM mutex

parent 6fecef23
No related branches found
No related tags found
No related merge requests found
...@@ -207,7 +207,8 @@ bool VideoRenderer::shmLock() ...@@ -207,7 +207,8 @@ bool VideoRenderer::shmLock()
{ {
const timespec timeout = createTimeout(); const timespec timeout = createTimeout();
/* We need an upper limit on how long we'll wait to avoid locking the whole GUI */ /* We need an upper limit on how long we'll wait to avoid locking the whole GUI */
if (sem_timedwait(&m_pShmArea->mutex, &timeout) == ETIMEDOUT) { if (sem_timedwait(&m_pShmArea->mutex, &timeout) < 0) {
if (errno == ETIMEDOUT)
qDebug() << "Timed out before shm lock was acquired"; qDebug() << "Timed out before shm lock was acquired";
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment