From 575659cfe809f32a46dd584b214f541dbd8609c7 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sun, 13 Jul 2008 23:20:56 +0200 Subject: [PATCH] playlist: wait for preparser end from playlist thread. --- src/playlist/engine.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/playlist/engine.c b/src/playlist/engine.c index bb0f2e4c23..2aa85d18dd 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -170,15 +170,11 @@ static void playlist_Destructor( vlc_object_t * p_this ) if( p_playlist->p_preparse ) { - vlc_object_kill( p_playlist->p_preparse ); - vlc_thread_join( p_playlist->p_preparse ); vlc_object_release( p_playlist->p_preparse ); } if( p_playlist->p_fetcher ) { - vlc_object_kill( p_playlist->p_fetcher ); - vlc_thread_join( p_playlist->p_fetcher ); vlc_object_release( p_playlist->p_fetcher ); } msg_Dbg( p_this, "Destroyed" ); @@ -508,6 +504,11 @@ void playlist_LastLoop( playlist_t *p_playlist ) playlist_ServicesDiscoveryKillAll( p_playlist ); playlist_MLDump( p_playlist ); + vlc_object_kill( p_playlist->p_preparse ); + vlc_thread_join( p_playlist->p_preparse ); + vlc_object_kill( p_playlist->p_fetcher ); + vlc_thread_join( p_playlist->p_fetcher ); + PL_LOCK; FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items ) free( p_del->pp_children ); -- 2.39.2