]> git.sesse.net Git - vlc/commitdiff
Fixed deadlock upon unloading qte_main plugin.
authorJean-Paul Saman <jpsaman@videolan.org>
Fri, 14 Feb 2003 13:48:41 +0000 (13:48 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Fri, 14 Feb 2003 13:48:41 +0000 (13:48 +0000)
Cleanup of debug messages.

modules/misc/qte_main.cpp
modules/video_output/qte/qte.cpp

index 77c331f6732a94968198cd56e1c03c7743c023a9..afdc8c751a587e545e1ef78635009894ef7a8c78 100644 (file)
@@ -2,7 +2,7 @@
  * qte_main.c : QT Embedded wrapper for gte_main
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: qte_main.cpp,v 1.2 2003/02/14 13:01:02 jpsaman Exp $
+ * $Id: qte_main.cpp,v 1.3 2003/02/14 13:48:41 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -130,13 +130,11 @@ static void Close( vlc_object_t *p_this )
         var_Destroy( p_this->p_libvlc, "qte" );
         return;
     }
-
     p_qte_main->p_qte_application->quit();
-    vlc_thread_join( p_qte_main );
 
     /* Cleanup allocated classes. */
-    delete p_qte_main->p_qte_application;
     delete p_qte_main->p_qte_widget;
+    delete p_qte_main->p_qte_application;
 
     vlc_object_destroy( p_qte_main );
     p_qte_main = NULL;
@@ -155,29 +153,22 @@ static void QteMain( qte_thread_t *p_this )
 {
     int argc = 0;
 
-    msg_Dbg( p_this, "qte_main: enter" );
     QApplication* pApp = new QApplication(argc, NULL);
     if(pApp)
     {
         p_this->p_qte_application = pApp;
     }
-    msg_Dbg( p_this, "qte_main: qte application created" );
 
     QWidget* pWidget = new QWidget();
     if(pWidget)
     {
         p_this->p_qte_widget = pWidget;
     }
-    msg_Dbg( p_this, "qte_main: qte dummy widget created" );
 
     /* signal the creation of the window */
     p_this->p_qte_application->setMainWidget(p_this->p_qte_widget);
 
     vlc_thread_ready( p_this );
-
-    msg_Dbg( p_this, "qte_main: qte application thread ready" );
     p_this->p_qte_application->exec();
-
-    msg_Dbg( p_this, "qte_main: leaving" );
 }
 
index 74c7cd19cbe0574d144d697c2dbe88fc74b387ce..fe3d85764ec5baed08d83b287587887001e80301 100644 (file)
@@ -2,7 +2,7 @@
  * qte.cpp : QT Embedded plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: qte.cpp,v 1.12 2003/02/12 23:13:51 jpsaman Exp $
+ * $Id: qte.cpp,v 1.13 2003/02/14 13:48:41 jpsaman Exp $
  *
  * Authors: Gerald Hansink <gerald.hansink@ordain.nl>
  *          Jean-Paul Saman <jpsaman@wxs.nl>
@@ -187,7 +187,7 @@ static void Close ( vlc_object_t *p_this )
 {
     vout_thread_t * p_vout = (vout_thread_t *)p_this;
 
-    msg_Err( p_vout, "Close" );
+    msg_Dbg( p_vout, "Close" );
     if( p_vout->p_sys->p_event )
     {
         vlc_object_detach( p_vout->p_sys->p_event );
@@ -199,8 +199,8 @@ static void Close ( vlc_object_t *p_this )
         vlc_thread_join( p_vout->p_sys->p_event );
         vlc_object_destroy( p_vout->p_sys->p_event );
     }
-
 #ifdef NEED_QTE_MAIN
+    msg_Dbg( p_vout, "Releasing qte_main" );
     module_Unneed( p_vout, p_vout->p_sys->p_qte_main );
 #endif