Commit 1dfd50c2 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc: Wait for input end.

parent d2265a34
...@@ -921,6 +921,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -921,6 +921,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
{ {
intf_thread_t * p_intf = NULL; intf_thread_t * p_intf = NULL;
vout_thread_t * p_vout = NULL; vout_thread_t * p_vout = NULL;
input_thread_t * p_input = NULL;
aout_instance_t * p_aout = NULL; aout_instance_t * p_aout = NULL;
announce_handler_t * p_announce = NULL; announce_handler_t * p_announce = NULL;
...@@ -939,6 +940,15 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -939,6 +940,15 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
msg_Dbg( p_libvlc, "removing playlist" ); msg_Dbg( p_libvlc, "removing playlist" );
playlist_ThreadDestroy( p_libvlc->p_playlist ); playlist_ThreadDestroy( p_libvlc->p_playlist );
/* Free input */
msg_Dbg( p_libvlc, "waiting all input end" );
while( (p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD )) )
{
vlc_object_kill( p_input );
vlc_thread_join( p_input );
vlc_object_release( p_input );
}
/* Free video outputs */ /* Free video outputs */
msg_Dbg( p_libvlc, "removing all video outputs" ); msg_Dbg( p_libvlc, "removing all video outputs" );
while( (p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD )) ) while( (p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD )) )
......
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