|
|
|
@ -153,8 +153,8 @@ int Deactivate( extensions_manager_t *p_mgr, extension_t *p_ext ) |
|
|
|
// Extension is stuck, kill it now
|
|
|
|
vlc_dialog_release( p_mgr, p_ext->p_sys->p_progress_id ); |
|
|
|
p_ext->p_sys->p_progress_id = NULL; |
|
|
|
vlc_mutex_unlock( &p_ext->p_sys->command_lock ); |
|
|
|
KillExtension( p_mgr, p_ext ); |
|
|
|
vlc_mutex_unlock( &p_ext->p_sys->command_lock ); |
|
|
|
return VLC_SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
@ -215,11 +215,10 @@ static int RemoveActivated( extensions_manager_t *p_mgr, extension_t *p_ext ) |
|
|
|
|
|
|
|
void KillExtension( extensions_manager_t *p_mgr, extension_t *p_ext ) |
|
|
|
{ |
|
|
|
/* Cancel thread if it seems stuck for a while */ |
|
|
|
msg_Dbg( p_mgr, "Killing extension now" ); |
|
|
|
vlc_cancel( p_ext->p_sys->thread ); |
|
|
|
lua_ExtensionDeactivate( p_mgr, p_ext ); |
|
|
|
p_ext->p_sys->b_exiting = true; |
|
|
|
vlc_cond_signal( &p_ext->p_sys->wait ); |
|
|
|
RemoveActivated( p_mgr, p_ext ); |
|
|
|
} |
|
|
|
|
|
|
|
@ -318,7 +317,6 @@ static void* Run( void *data ) |
|
|
|
extensions_manager_t *p_mgr = p_ext->p_sys->p_mgr; |
|
|
|
|
|
|
|
vlc_mutex_lock( &p_ext->p_sys->command_lock ); |
|
|
|
mutex_cleanup_push( &p_ext->p_sys->command_lock ); |
|
|
|
|
|
|
|
while( !p_ext->p_sys->b_exiting ) |
|
|
|
{ |
|
|
|
@ -336,7 +334,6 @@ static void* Run( void *data ) |
|
|
|
vlc_mutex_unlock( &p_ext->p_sys->command_lock ); |
|
|
|
|
|
|
|
/* Run command */ |
|
|
|
int cancel = vlc_savecancel(); |
|
|
|
if( LockExtension( p_ext ) ) |
|
|
|
{ |
|
|
|
switch( cmd->i_command ) |
|
|
|
@ -423,11 +420,9 @@ static void* Run( void *data ) |
|
|
|
} |
|
|
|
FreeCommands( cmd ); |
|
|
|
|
|
|
|
vlc_restorecancel( cancel ); |
|
|
|
vlc_mutex_lock( &p_ext->p_sys->command_lock ); |
|
|
|
} |
|
|
|
|
|
|
|
vlc_cleanup_pop( ); |
|
|
|
vlc_mutex_unlock( &p_ext->p_sys->command_lock ); |
|
|
|
msg_Dbg( p_mgr, "Extension thread end: '%s'", p_ext->psz_title ); |
|
|
|
|
|
|
|
|