summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-22 12:01:16 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-22 12:01:16 +0200
commit1219c506a236145a01207a4f57bb8099bdf913a6 (patch)
tree98c2e828636c50b2fd2d384aefdd57451c1cb238 /streamer.c
parent1646c6b35ab4c0c767a7bfde29b85d5c1ef467f0 (diff)
fixed streamer hang when song was interrupted during final drain
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/streamer.c b/streamer.c
index 7a996ffe..f51653c6 100644
--- a/streamer.c
+++ b/streamer.c
@@ -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;