[vlc-devel] commit: Extensions: hopefully fix a race condition on deactivation ( Jean-Philippe André )

git version control git at videolan.org
Wed Feb 3 17:21:56 CET 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Wed Feb  3 15:04:17 2010 +0100| [ef5d32ea57103e44f7480abe21de01ec9550b9fb] | committer: Jean-Philippe André 

Extensions: hopefully fix a race condition on deactivation

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

 modules/misc/lua/extension_thread.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/misc/lua/extension_thread.c b/modules/misc/lua/extension_thread.c
index ac3a459..3b1cbd9 100644
--- a/modules/misc/lua/extension_thread.c
+++ b/modules/misc/lua/extension_thread.c
@@ -199,7 +199,9 @@ static int RemoveActivated( extensions_manager_t *p_mgr, extension_t *p_ext )
 void WaitForDeactivation( extension_t *p_ext )
 {
     void *pointer = NULL;
+    vlc_mutex_lock( &p_ext->p_sys->command_lock );
     vlc_cond_signal( &p_ext->p_sys->wait );
+    vlc_mutex_unlock( &p_ext->p_sys->command_lock );
     vlc_join( p_ext->p_sys->thread, &pointer );
 }
 
@@ -383,7 +385,7 @@ static void* Run( void *data )
     }
 
     vlc_mutex_unlock( &p_ext->p_sys->command_lock );
-    msg_Dbg( p_mgr, "Extension thread ending..." );
+    msg_Dbg( p_mgr, "Extension thread end: '%s'", p_ext->psz_title );
 
     // Note: At this point, the extension should be deactivated
     return NULL;




More information about the vlc-devel mailing list