Commit 8f0f6c74 authored by Laurent Aimar's avatar Laurent Aimar

Clean up main playlist thread.

No useless wake up and simplify.
Fix a few race conditions with deactivation.
parent b2efc40a
......@@ -190,7 +190,10 @@ int playlist_PreparseEnqueue( playlist_t *p_playlist,
{
playlist_private_t *p_sys = pl_priv(p_playlist);
playlist_preparser_Push( p_sys->p_preparser, p_item );
PL_LOCK;
if( p_sys->p_preparser )
playlist_preparser_Push( p_sys->p_preparser, p_item );
PL_UNLOCK;
return VLC_SUCCESS;
}
......@@ -200,7 +203,10 @@ int playlist_AskForArtEnqueue( playlist_t *p_playlist,
{
playlist_private_t *p_sys = pl_priv(p_playlist);
playlist_fetcher_Push( p_sys->p_fetcher, p_item );
PL_LOCK;
if( p_sys->p_fetcher )
playlist_fetcher_Push( p_sys->p_fetcher, p_item );
PL_UNLOCK;
return VLC_SUCCESS;
}
......
......@@ -174,11 +174,12 @@ static void playlist_Destructor( vlc_object_t * p_this )
playlist_t *p_playlist = (playlist_t *)p_this;
playlist_private_t *p_sys = pl_priv(p_playlist);
assert( !p_sys->p_input );
assert( !p_sys->p_sout );
assert( !p_sys->p_preparser );
assert( !p_sys->p_fetcher );
msg_Err( p_this, "Destroyed" );
msg_Dbg( p_this, "Destroyed" );
}
/** Get current playing input.
......
This diff is collapsed.
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