summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-24 23:06:38 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-24 23:06:38 +0100
commit5b8000f768f845e36ddde3ccca18f119b7a37d15 (patch)
treed26ac7f387478ef2582c34f1003ae3d7bc28d1e4 /streamer.c
parent8898269bcdbc8dac0306c6ebbc07bccc8b21fa87 (diff)
fixed bugs when seeking in very short streams, or very close to the end of stream
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/streamer.c b/streamer.c
index 7ca4cecf..cc0ff7ee 100644
--- a/streamer.c
+++ b/streamer.c
@@ -808,6 +808,7 @@ streamer_thread (void *ctx) {
}
}
+ bytes_until_next_song = -1;
streamer_buffering = 1;
int trk = str_get_idx_of (streaming_track);
if (trk != -1) {
@@ -863,7 +864,7 @@ streamer_thread (void *ctx) {
// if (streamer_buffering) trace ("fill: %d, read: %d, size=%d, blocksize=%d\n", streambuffer_fill, bytesread, STREAM_BUFFER_SIZE, blocksize);
}
streamer_unlock ();
- if (streambuffer_fill > 128000 && streamer_buffering || !streaming_track) {
+ if ((streambuffer_fill > 128000 && streamer_buffering) || !streaming_track) {
streamer_buffering = 0;
if (streaming_track) {
int trk = str_get_idx_of (streaming_track);