diff src/audacious/playback.c @ 2592:6f7be3702c5f trunk

[svn] - revert the penalty-based "find something to play" logic of 1.2. it's mostly irrelevant now, because entries should have a decoder mapped to them by the time we get here now, and if they don't, playback_play_file() can handle it.
author nenolod
date Wed, 28 Feb 2007 09:52:22 -0800
parents aa60c92e7491
children 2ba01bb7e36a
line wrap: on
line diff
--- a/src/audacious/playback.c	Wed Feb 28 07:44:30 2007 -0800
+++ b/src/audacious/playback.c	Wed Feb 28 09:52:22 2007 -0800
@@ -77,7 +77,6 @@
 {
     PlaylistEntry *entry = NULL;
     Playlist *playlist = playlist_get_active();
-    gint penalty = 0;
 
     g_return_if_fail(playlist_get_length(playlist) != 0);
 
@@ -90,33 +89,7 @@
 
     entry = playlist_get_entry_to_play(playlist);
     g_return_if_fail(entry != NULL);
-
-    /*
-     * If the playlist entry cannot be played, try to pick another one.
-     * If that does not work, e.g. entry == NULL, then bail.
-     *
-     *   - nenolod
-     */
-    for (penalty = 0; penalty <= 15 && entry != NULL && !playback_play_file(entry); penalty++)
-    {
-        playlist_next(playlist);
-
-        entry = playlist_get_entry_to_play(playlist);
-
-        /* XXX ew. workaround for a stupid bug where audacious will keep 
-         * trying to play a file with no valid decoder.
-         */
-        g_return_if_fail(entry != NULL);
-
-        if (entry->decoder == NULL )
-            entry->decoder = input_check_file(entry->filename, FALSE);
-
-        /* if we hit 15 entries in a row with no valid decoder, just 
-         * bail due to confusion
-         */
-        if (penalty == 15)
-            return;
-    }
+    playback_play_file(entry);
 
     if (playback_get_time() != -1) {
         equalizerwin_load_auto_preset(entry->filename);