Commit d1863133 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: Make sure the currently playing item is released, even if destroyed.

(Happens when using a service discovery).
parent 6d77d7dd
...@@ -487,6 +487,14 @@ void playlist_LastLoop( playlist_t *p_playlist ) ...@@ -487,6 +487,14 @@ void playlist_LastLoop( playlist_t *p_playlist )
playlist_ItemDelete( p_playlist->status.p_node ); playlist_ItemDelete( p_playlist->status.p_node );
p_playlist->status.p_node = NULL; p_playlist->status.p_node = NULL;
} }
if( p_playlist->status.p_item &&
p_playlist->status.p_item->i_flags & PLAYLIST_REMOVE_FLAG )
{
PL_DEBUG( "%s was marked for deletion, deleting",
PLI_NAME( p_playlist->status.p_item ) );
playlist_ItemDelete( p_playlist->status.p_item );
p_playlist->status.p_item = NULL;
}
/* Core should have terminated all SDs before the playlist */ /* Core should have terminated all SDs before the playlist */
/* TODO: It fails to do so when not playing anything -- Courmisch */ /* TODO: It fails to do so when not playing anything -- Courmisch */
......
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