[vlc-commits] playlist/thread: do not stop on removed node

Filip Roséen git at videolan.org
Thu May 18 17:51:32 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:01:14 2017 +0200| [50309d3a55124a9804d75ab5a37a4e6beb075b68] | committer: Rémi Denis-Courmont

playlist/thread: do not stop on removed node

If get_current_status_item( p_playlist ) returns NULL there are no
previously "playing" entity on automatic next, meaning that it is very
confusing if the playlist stops at such (non-existing) entity.

Given a flat playlist, a node containing children will be removed and
the children posted to the node's parent, meaning that the original
node is removed. Given that the node is removed, stopping after
"playback" of such entity looks like we simply did nothing (imagine a
directory containing no children).

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50309d3a55124a9804d75ab5a37a4e6beb075b68
---

 src/playlist/thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 104c92364a..5632babe4d 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -373,7 +373,7 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
             msg_Dbg( p_playlist,"repeating item" );
             return get_current_status_item( p_playlist );
         }
-        if( b_playstop )
+        if( b_playstop && get_current_status_item( p_playlist ) )
         {
             msg_Dbg( p_playlist,"stopping (play and stop)" );
             return NULL;



More information about the vlc-commits mailing list