/** Wait for an extension to finish */
void WaitForDeactivation( extension_t *p_ext )
{
- void *pointer = NULL;
- vlc_cond_signal( &p_ext->p_sys->wait );
- vlc_join( p_ext->p_sys->thread, &pointer );
+ vlc_join( p_ext->p_sys->thread, NULL );
}
/** Push a UI command */
if( cmd )
{
p_ext->p_sys->command = cmd->next;
+ cmd->next = NULL; // This prevents FreeCommands from freeing next
}
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
msg_Dbg( p_mgr, "Trigger menu %d of '%s'",
*pi_id, p_ext->psz_name );
lua_ExtensionTriggerMenu( p_mgr, p_ext, *pi_id );
- free( pi_id );
break;
}
}
}
+ FreeCommands( cmd );
+
vlc_mutex_lock( &p_ext->p_sys->command_lock );
if( !p_ext->p_sys->b_exiting && !p_ext->p_sys->command )
{
}
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;