diff options
author | waker <wakeroid@gmail.com> | 2009-08-22 12:01:16 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-22 12:01:16 +0200 |
commit | 1219c506a236145a01207a4f57bb8099bdf913a6 (patch) | |
tree | 98c2e828636c50b2fd2d384aefdd57451c1cb238 /streamer.c | |
parent | 1646c6b35ab4c0c767a7bfde29b85d5c1ef467f0 (diff) |
fixed streamer hang when song was interrupted during final drain
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -61,6 +61,10 @@ void streamer_set_nextsong (int song, int pstate) { nextsong = song; nextsong_pstate = pstate; + if (p_isstopped ()) { + // no sense to wait until end of previous song, reset buffer + bytes_until_next_song = 0; + } } void @@ -76,7 +80,6 @@ streamer_thread (uintptr_t ctx) { codecleft = 0; while (!streaming_terminate) { -// printf ("buns: %d\n", bytes_until_next_song); if (nextsong >= 0 && bytes_until_next_song == 0) { int sng = nextsong; int pstate = nextsong_pstate; |