[vlc-devel] [PATCH 3/3] Qt, Mac: Fix regressions in the Qt4 Mac interface.

Juho Vähä-Herttua juhovh at iki.fi
Tue Nov 30 22:56:29 CET 2010


Fixes a lockup caused by 841eb240885cbea14245dfd832c9f1ab31d12bf4 and an
infinite recursion crash caused by 1c9669ac53e83beadcd112f909b239a9645b031c,
both related to the OSX main thread hack.
---
 modules/gui/qt4/qt4.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index a034ce6..9e69286 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -295,7 +295,7 @@ static bool active = false;
 #include "../../../src/control/libvlc_internal.h" /* libvlc_SetExitHandler */
 static void Abort( void *obj )
 {
-    QVLCApp::triggerQuit();
+    QCoreApplication::exit(0);
 }
 #endif
 
@@ -349,6 +349,9 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
 #endif
     vlc_sem_init (&ready, 0);
 #ifdef Q_WS_MAC
+    /* Unlock the QMutexLocker mutex, no races in single thread */
+    locker.mutex()->unlock();
+
     /* Run mainloop on the main thread as Cocoa requires */
     libvlc_SetExitHandler( p_intf->p_libvlc, Abort, p_intf );
     Thread( (void *)p_intf );
-- 
1.6.5.7




More information about the vlc-devel mailing list