[vlc-devel] commit: libvlc: Wait for input end. (Pierre d'Herbemont )
git version control
git at videolan.org
Sat Mar 29 21:53:18 CET 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Mar 29 21:20:55 2008 +0100| [1dfd50c2ad27eba42ab4d39b84f9d04e6fc4d259]
libvlc: Wait for input end.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1dfd50c2ad27eba42ab4d39b84f9d04e6fc4d259
---
src/libvlc-common.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/libvlc-common.c b/src/libvlc-common.c
index 33a80c1..e7755d5 100644
--- a/src/libvlc-common.c
+++ b/src/libvlc-common.c
@@ -921,6 +921,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
{
intf_thread_t * p_intf = NULL;
vout_thread_t * p_vout = NULL;
+ input_thread_t * p_input = NULL;
aout_instance_t * p_aout = NULL;
announce_handler_t * p_announce = NULL;
@@ -939,6 +940,15 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
msg_Dbg( p_libvlc, "removing 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 */
msg_Dbg( p_libvlc, "removing all video outputs" );
while( (p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD )) )
More information about the vlc-devel
mailing list