Commit 4d654a48 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

interface: Make sure the MonitorLibVLCDeath thread exit.

parent 7291c459
......@@ -147,6 +147,13 @@ int intf_RunThread( intf_thread_t *p_intf )
return VLC_EGENERIC;
}
RunInterface( p_intf );
/* Make sure our MonitorLibVLCDeath thread exit */
vlc_object_kill( p_intf );
/* It is monitoring libvlc, not the p_intf */
vlc_object_signal( p_intf->p_libvlc );
vlc_thread_join( p_intf );
vlc_object_detach( p_intf );
vlc_object_release( p_intf );
return VLC_SUCCESS;
......@@ -255,7 +262,14 @@ static void MonitorLibVLCDeath( intf_thread_t *p_intf )
libvlc_int_t * p_libvlc = p_intf->p_libvlc;
vlc_object_lock( p_libvlc );
while(vlc_object_alive( p_libvlc ) )
{
if(p_intf->b_die)
{
vlc_object_unlock( p_libvlc );
return;
}
vlc_object_wait( p_libvlc );
}
vlc_object_unlock( p_libvlc );
/* Someone killed libvlc */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment