diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-02-04 20:11:45 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-02-04 20:11:45 +0100 |
commit | 1378733bca965af78bda2a55aae1bcf7b0318d26 (patch) | |
tree | 747a84b39cc47b59289af2a69ecf27729019ad69 | |
parent | 8ee35ba440ff17efd712868acfedb062358e6ad7 (diff) |
fixed playback in shuffle mode after encountering bad track
-rw-r--r-- | streamer.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -184,11 +184,12 @@ streamer_set_current (playItem_t *it) { pl_item_copy (&str_streaming_song, it); mutex_unlock (decodemutex); if (ret < 0) { + it->played = 1; trace ("decoder->init returned %d\n", ret); trace ("orig_playing_song = %p\n", orig_playing_song); streamer_buffering = 0; if (playlist_current_ptr == it) { - playlist_current_ptr = NULL; +// playlist_current_ptr = NULL; messagepump_push (M_TRACKCHANGED, 0, to, 0); } return ret; @@ -200,6 +201,7 @@ streamer_set_current (playItem_t *it) { } else { trace ("no decoder in playitem!\n"); + it->played = 1; streamer_buffering = 0; if (playlist_current_ptr == it) { playlist_current_ptr = NULL; @@ -296,7 +298,7 @@ streamer_thread (void *ctx) { } int ret = streamer_set_current (try); if (ret < 0) { - trace ("failed to play track %s, skipping...\n", try->fname); + trace ("\033[0;31mfailed to play track %s, skipping (current=%p)...\033[37;0m\n", try->fname, orig_streaming_song); // remember bad song number in case of looping if (badsong == -1) { badsong = sng; |