[vlmc-devel] commit: Fixing a race condition. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Tue Jul 27 22:18:29 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Jul 27 22:18:14 2010 +0200| [9ae9589ccea9d88f9db6e74599d6811d3e13bc1e] | committer: Hugo Beauzée-Luyssen 

Fixing a race condition.

This seems to be introduced when using pulse audio output, as it calls
XopenDisplay(), and so does Qt.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9ae9589ccea9d88f9db6e74599d6811d3e13bc1e
---

 src/Main/guimain.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/Main/guimain.cpp b/src/Main/guimain.cpp
index 2bb72ce..71a631d 100644
--- a/src/Main/guimain.cpp
+++ b/src/Main/guimain.cpp
@@ -38,6 +38,10 @@
 #include <QColor>
 #include <QPalette>
 
+#ifdef Q_WS_X11
+#include <X11/Xlib.h>
+#endif
+
 /**
  *  VLMC Entry point
  *  \brief this is the VLMC entry point
@@ -48,6 +52,9 @@
 int
 VLMCmain( int argc, char **argv )
 {
+#ifdef Q_WS_X11
+    XInitThreads();
+#endif
     QApplication app( argc, argv );
     app.setApplicationName( "vlmc" );
     app.setOrganizationName( "vlmc" );



More information about the Vlmc-devel mailing list