[vlc-devel] commit: Qt4: remove pointless locking ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Sep 12 13:28:08 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep 12 14:27:11 2009 +0300| [ef551582c6e2bda1e21e1cfd22d2d99ea3622e8e] | committer: Rémi Denis-Courmont 

Qt4: remove pointless locking

The main interface video window calls are re-entrant nowadays.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef551582c6e2bda1e21e1cfd22d2d99ea3622e8e
---

 modules/gui/qt4/qt4.cpp |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 1f30b3a..85446aa 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -478,7 +478,7 @@ static void *Thread( void *obj )
 
     if (p_mi != NULL)
     {
-        QMutexLocker locker (&iface.lock);
+        /* FIXME: are we sure that video window is already destroyed? */
 
         msg_Dbg (p_intf, "destroying the main Qt4 interface");
         p_intf->p_sys->p_mi = NULL;
@@ -543,8 +543,6 @@ static int WindowOpen( vlc_object_t *p_obj )
     if( p_wnd->cfg->is_standalone )
         return VLC_EGENERIC;
 
-    QMutexLocker( &iface.lock );
-
     vlc_value_t val;
 
     if( var_Get( p_obj->p_libvlc, "qt4-iface", &val ) )
@@ -585,8 +583,6 @@ static int WindowOpen( vlc_object_t *p_obj )
 static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
 {
     MainInterface *p_mi = (MainInterface *)p_wnd->sys;
-    QMutexLocker locker(&iface.lock);
-
     return p_mi->controlVideo( i_query, args );
 }
 
@@ -595,8 +591,6 @@ static void WindowClose( vlc_object_t *p_obj )
     vout_window_t *p_wnd = (vout_window_t*)p_obj;
     MainInterface *p_mi = (MainInterface *)p_wnd->sys;
 
-    QMutexLocker locker( &iface.lock );
-
     msg_Dbg( p_obj, "releasing video..." );
     p_mi->releaseVideo();
 }




More information about the vlc-devel mailing list