]> git.sesse.net Git - vlc/commitdiff
svn merge -r 11179:11181 trunk branches/0.8.2
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 27 May 2005 20:42:13 +0000 (20:42 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 27 May 2005 20:42:13 +0000 (20:42 +0000)
modules/demux/playlist/b4s.c
modules/demux/playlist/m3u.c
modules/demux/playlist/pls.c
src/input/demux.c
src/playlist/view.c

index 01a4d82c563d13df24fe7f7357ff56149d0f968f..01b98a52079e36f432479b6b934cd32dc4d7cb0e 100644 (file)
@@ -391,11 +391,13 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Go back and play the playlist */
-    if( b_play )
+    if( b_play && p_playlist->status.p_item &&
+        p_playlist->status.p_item->i_children > 0 )
     {
         playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
                           p_playlist->status.i_view,
-                          p_playlist->status.p_item, NULL );
+                          p_playlist->status.p_item,
+                          p_playlist->status.p_item->pp_children[0] );
     }
     
     vlc_object_release( p_playlist );
index a0c688d6799512e2c2d4546c94010b43dc881178..e20b0d8ec27b94036730f7c045e2c0152cf22833 100644 (file)
@@ -243,11 +243,13 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Go back and play the playlist */
-    if( b_play )
+    if( b_play && p_playlist->status.p_item &&
+        p_playlist->status.p_item->i_children > 0 )
     {
         playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
                           p_playlist->status.i_view,
-                          p_playlist->status.p_item, NULL );
+                          p_playlist->status.p_item,
+                          p_playlist->status.p_item->pp_children[0] );
     }
 
     vlc_object_release( p_playlist );
index 4b9e56e31e12fdf85f276aa5f0e70c716760e8fd..eb566dfefa01e23037cabc808b664b3fb84f69cf 100644 (file)
@@ -272,11 +272,13 @@ static int Demux( demux_t *p_demux )
         psz_name = NULL;
     }
 
-    if( b_play )
+    if( b_play && p_playlist->status.p_item &&
+        p_playlist->status.p_item->i_children > 0 )
     {
         playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
                           p_playlist->status.i_view,
-                          p_playlist->status.p_item, NULL );
+                          p_playlist->status.p_item,
+                          p_playlist->status.p_item->pp_children[0] );
     }
     vlc_object_release( p_playlist );
     return VLC_SUCCESS;
index 87a20757d3f986683e3b7ca4ad5da016e776322b..6516bcddbcf2b202f32c38e54dc559a87513de80 100644 (file)
@@ -88,7 +88,7 @@ demux_t *__demux2_New( vlc_object_t *p_obj,
             { "au",   "au" },
             { "flac", "flac" },
             { "dv",   "dv" },
-            { "m3u",  "m3u" },
+            { "m3u",  "playlist" },
             { "mkv",  "mkv" }, { "mka",  "mkv" }, { "mks",  "mkv" },
             { "mp4",  "mp4" }, { "m4a",  "mp4" }, { "mov",  "mp4" }, { "moov", "mp4" },
             { "mod",  "mod" }, { "xm",   "mod" },
index 3c15cc0d0163edb0c93b31c30bde3b364f39727d..4b2dc3d5f7dbd3bbd78bd8415234c4b5a3e6b585 100644 (file)
@@ -611,13 +611,14 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
 #ifdef PLAYLIST_DEBUG
     if( p_item != NULL )
     {
-        msg_Dbg( p_playlist, "finding next of %s within %s",
-                        p_item->input.psz_name, p_node->input.psz_name );
+        msg_Dbg( p_playlist, "finding next of %s within %s - root %s",
+                        p_item->input.psz_name, p_node->input.psz_name,
+                        p_root->input.psz_name );
     }
     else
     {
-        msg_Dbg( p_playlist, "finding something to play within %s",
-                                 p_node->input.psz_name );
+        msg_Dbg( p_playlist, "finding something to play within %s -root %s",
+                            p_node->input.psz_name, p_root->input.psz_name );
 
     }
 #endif
@@ -652,6 +653,10 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
     {
         if( p_playlist->b_go_next )
         {
+#ifdef PLAYLIST_DEBUG
+            msg_Dbg( p_playlist, "Moving on to next node: search from %s",
+                            p_root->input.psz_name );
+#endif
             p_next = playlist_RecursiveFindNext( p_playlist, i_view,
                                 p_root, p_item, p_search );
             if( p_next == NULL )
@@ -663,6 +668,9 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
         }
         else
         {
+#ifdef PLAYLIST_DEBUG
+            msg_Dbg( p_playlist, "Not moving on to next node: you loose" );
+#endif
             return NULL;
         }
     }
@@ -782,6 +790,10 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
 #endif
                 if( p_parent == p_root )
                 {
+#ifdef PLAYLIST_DEBUG
+                    msg_Dbg( p_playlist, "At root item (%s)",
+                                         p_root->input.psz_name );
+#endif
                     /* Hmm, seems it's the end for you, guy ! */
                     return NULL;
                 }
@@ -874,6 +886,10 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
 #endif
                 if( p_parent == p_root )
                 {
+#ifdef PLAYLIST_DEBUG
+                    msg_Dbg( p_playlist, "At root item (%s)",
+                                         p_root->input.psz_name );
+#endif
                     /* Hmm, seems it's the end for you, guy ! */
                     return NULL;
                 }