changeset 2128:a414866b32bc trunk

[svn] - bail after 15 failures to find an acceptable playback candidate
author nenolod
date Fri, 15 Dec 2006 10:48:13 -0800
parents 63af5b9c5026
children 0d845907c0b9
files ChangeLog audacious/playback.c
diffstat 2 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 15 08:23:51 2006 -0800
+++ b/ChangeLog	Fri Dec 15 10:48:13 2006 -0800
@@ -1,3 +1,20 @@
+2006-12-15 16:23:51 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [3259]
+  - add playlist_select_playlist() to select a literal playlist
+  - add xmms_remote_playlist_enqueue_to_temp()
+  - add controlsocket handler for enqueue to temp
+  - add commandline parsing for enqueue to temp
+  
+  trunk/audacious/controlsocket.c |   12 ++++++++++++
+  trunk/audacious/controlsocket.h |    3 ++-
+  trunk/audacious/main.c          |   10 +++++++++-
+  trunk/audacious/playlist.c      |   14 ++++++++++++++
+  trunk/audacious/playlist.h      |    2 ++
+  trunk/libaudacious/beepctrl.c   |   14 ++++++++++++++
+  trunk/libaudacious/beepctrl.h   |    1 +
+  7 files changed, 54 insertions(+), 2 deletions(-)
+
+
 2006-12-15 15:52:09 +0000  William Pitcock <nenolod@nenolod.net>
   revision [3257]
   - use playlist_get_active() at the top of each thread.
--- a/audacious/playback.c	Fri Dec 15 08:23:51 2006 -0800
+++ b/audacious/playback.c	Fri Dec 15 10:48:13 2006 -0800
@@ -82,6 +82,7 @@
 {
     PlaylistEntry *entry = NULL;
     Playlist *playlist = playlist_get_active();
+    int penalty;
 
     if (playlist_get_length(playlist) == 0)
         return;
@@ -110,8 +111,21 @@
 
         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.
+	 */
         if (entry == NULL)
             return;
+
+	if (entry->decoder == NULL &&
+	    (entry->decoder = input_check_file(entry->filename, FALSE)) == NULL)
+	    penalty++;
+
+	/* if we hit 15 entries in a row with no valid decoder, just 
+         * bail due to confusion
+	 */
+	if (penalty > 15)
+	    return;
     }
 
     if (bmp_playback_get_time() != -1) {