From d1863133191334a600e78d16838648eb7ca36f18 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sun, 6 Jul 2008 19:39:27 +0200 Subject: [PATCH] playlist: Make sure the currently playing item is released, even if destroyed. (Happens when using a service discovery). --- src/playlist/engine.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 */ -- 2.39.2