mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
lua: Fix deadlock when deactivating extension due to timeout.
lua_ExecuteFunctionVa is not meant to be called with the command_lock
held.
This partially reverts 7a94f2e6b2
Fix #17565
This commit is contained in:
parent
88986e0b81
commit
ce3fbfca7c
@ -1223,8 +1223,8 @@ static void WatchTimerCallback( void *data )
|
||||
vlc_dialog_release( p_mgr, p_ext->p_sys->p_progress_id );
|
||||
p_ext->p_sys->p_progress_id = NULL;
|
||||
}
|
||||
KillExtension( p_mgr, p_ext );
|
||||
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
|
||||
KillExtension( p_mgr, p_ext );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1239,8 +1239,8 @@ static void WatchTimerCallback( void *data )
|
||||
p_ext->psz_title );
|
||||
if( p_ext->p_sys->p_progress_id == NULL )
|
||||
{
|
||||
KillExtension( p_mgr, p_ext );
|
||||
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
|
||||
KillExtension( p_mgr, p_ext );
|
||||
return;
|
||||
}
|
||||
vlc_timer_schedule( p_ext->p_sys->timer, false, 100000, 0 );
|
||||
@ -1251,8 +1251,8 @@ static void WatchTimerCallback( void *data )
|
||||
{
|
||||
vlc_dialog_release( p_mgr, p_ext->p_sys->p_progress_id );
|
||||
p_ext->p_sys->p_progress_id = NULL;
|
||||
KillExtension( p_mgr, p_ext );
|
||||
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
|
||||
KillExtension( p_mgr, p_ext );
|
||||
return;
|
||||
}
|
||||
vlc_timer_schedule( p_ext->p_sys->timer, false, 100000, 0 );
|
||||
|
@ -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;
|
||||
KillExtension( p_mgr, p_ext );
|
||||
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
|
||||
KillExtension( p_mgr, p_ext );
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
@ -217,8 +217,10 @@ void KillExtension( extensions_manager_t *p_mgr, extension_t *p_ext )
|
||||
{
|
||||
msg_Dbg( p_mgr, "Killing extension now" );
|
||||
lua_ExtensionDeactivate( p_mgr, p_ext );
|
||||
vlc_mutex_lock( &p_ext->p_sys->command_lock );
|
||||
p_ext->p_sys->b_exiting = true;
|
||||
vlc_cond_signal( &p_ext->p_sys->wait );
|
||||
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
|
||||
RemoveActivated( p_mgr, p_ext );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user