Commit 575659cf authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: wait for preparser end from playlist thread.

parent 81b983e8
...@@ -170,15 +170,11 @@ static void playlist_Destructor( vlc_object_t * p_this ) ...@@ -170,15 +170,11 @@ static void playlist_Destructor( vlc_object_t * p_this )
if( p_playlist->p_preparse ) 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 ); vlc_object_release( p_playlist->p_preparse );
} }
if( p_playlist->p_fetcher ) 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 ); vlc_object_release( p_playlist->p_fetcher );
} }
msg_Dbg( p_this, "Destroyed" ); msg_Dbg( p_this, "Destroyed" );
...@@ -508,6 +504,11 @@ void playlist_LastLoop( playlist_t *p_playlist ) ...@@ -508,6 +504,11 @@ void playlist_LastLoop( playlist_t *p_playlist )
playlist_ServicesDiscoveryKillAll( p_playlist ); playlist_ServicesDiscoveryKillAll( p_playlist );
playlist_MLDump( 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; PL_LOCK;
FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items ) FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
free( p_del->pp_children ); free( p_del->pp_children );
......
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