Mercurial > audlegacy
diff audacious/playback.c @ 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 | f18a5b617c34 |
children | 840263ee3a5c |
line wrap: on
line diff
--- 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) {