From: Pierre d'Herbemont Date: Sun, 13 Jul 2008 21:20:56 +0000 (+0200) Subject: playlist: wait for preparser end from playlist thread. X-Git-Tag: 0.9.0-test2~7 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=575659cfe809f32a46dd584b214f541dbd8609c7;p=vlc playlist: wait for preparser end from playlist thread. --- 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 );