diff audacious/playback.c @ 1913:30d40252862d trunk

[svn] - this should fix #592. somebody please check.
author nenolod
date Mon, 30 Oct 2006 02:32:34 -0800
parents 600efc52c645
children 25308f10b50f
line wrap: on
line diff
--- a/audacious/playback.c	Mon Oct 30 01:39:13 2006 -0800
+++ b/audacious/playback.c	Mon Oct 30 02:32:34 2006 -0800
@@ -81,7 +81,7 @@
 void
 bmp_playback_initiate(void)
 {
-    PlaylistEntry *entry;
+    PlaylistEntry *entry = NULL;
 
     if (playlist_get_length() == 0)
         return;
@@ -98,8 +98,21 @@
     if (!entry)
         return;
 
-    if (!bmp_playback_play_file(entry))
-        return;
+    /*
+     * If the playlist entry cannot be played, try to pick another one.
+     * If that does not work, e.g. entry == NULL, then bail.
+     *
+     *   - nenolod
+     */
+    while (entry != NULL && !bmp_playback_play_file(entry))
+    {
+        playlist_next();
+
+        entry = playlist_get_entry_to_play();
+
+        if (entry == NULL)
+            return;
+    }
 
     if (bmp_playback_get_time() != -1) {
         equalizerwin_load_auto_preset(entry->filename);