[vlc-devel] [PATCH 6/6] Update the MonitorLibVLCDeath hack to work on libvlc_Quit

Juho Vähä-Herttua juhovh at iki.fi
Sat Jul 24 22:31:14 CEST 2010


---
 src/interface/interface.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 5c674d2..294f509 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -201,7 +201,8 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
 
         if( p_intf->pf_run )
             vlc_thread_join( p_intf );
-        module_unneed( p_intf, p_intf->p_module );
+        if( p_intf->p_module )
+            module_unneed( p_intf, p_intf->p_module );
         free( p_intf->psz_intf );
         config_ChainDestroy( p_intf->p_cfg );
         vlc_object_release( p_intf );
@@ -240,7 +241,10 @@ static void * MonitorLibVLCDeath( vlc_object_t * p_this )
 
     libvlc_InternalWait( p_libvlc );
 
-    vlc_object_kill( p_intf ); /* Kill the stupid first thread interface */
+    /* remove the module, this will call Close() */
+    module_unneed( p_intf, p_intf->p_module );
+    p_intf->p_module = NULL;
+
     vlc_restorecancel (canc);
     return NULL;
 }
-- 
1.6.5.7




More information about the vlc-devel mailing list