]> git.sesse.net Git - vlc/commitdiff
Correctly handle "no-skip" items
authorClément Stenac <zorglub@videolan.org>
Sat, 16 Sep 2006 19:20:42 +0000 (19:20 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 16 Sep 2006 19:20:42 +0000 (19:20 +0000)
src/playlist/control.c

index ec5b0e8c9583c9b22fed9827c515c053755b55f9..521a9d26f4cc7de32a202ee1ea9e9da655d359c9 100644 (file)
@@ -273,11 +273,18 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
         return NULL;
     }
 
-    if( !p_playlist->request.b_request && p_playlist->status.p_item &&
-         p_playlist->status.p_item->i_flags & PLAYLIST_SKIP_FLAG )
+    if( !p_playlist->request.b_request && p_playlist->status.p_item )
     {
-        msg_Dbg( p_playlist, "blocking item, stopping") ;
-        return NULL;
+        playlist_item_t *p_parent = p_playlist->status.p_item;
+        while( p_parent )
+        {
+            if( p_parent->i_flags & PLAYLIST_SKIP_FLAG )
+            {
+                msg_Dbg( p_playlist, "blocking item, stopping") ;
+                return NULL;
+            }
+            p_parent = p_parent->p_parent;
+        }
     }
 
     /* Random case. This is an exception: if request, but request is skip +- 1