From: Pierre d'Herbemont Date: Sun, 6 Jul 2008 17:39:27 +0000 (+0200) Subject: playlist: Make sure the currently playing item is released, even if destroyed. X-Git-Tag: 0.9.0-test2~163 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d1863133191334a600e78d16838648eb7ca36f18;p=vlc playlist: Make sure the currently playing item is released, even if destroyed. (Happens when using a service discovery). --- diff --git a/src/playlist/engine.c b/src/playlist/engine.c index 152b48b18c..1a39ce50f9 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -487,6 +487,14 @@ void playlist_LastLoop( playlist_t *p_playlist ) playlist_ItemDelete( p_playlist->status.p_node ); 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 */ /* TODO: It fails to do so when not playing anything -- Courmisch */