diff options
author | 2010-01-28 20:33:27 +0100 | |
---|---|---|
committer | 2010-01-28 20:33:27 +0100 | |
commit | aaad8d420010b2923a684d9bd9293aa7734e6972 (patch) | |
tree | 95cddd914ca2e2faa79c320f838532c8f154d00b | |
parent | 11af0fd25871ee652bf92eaeeb50c66af75d01d3 (diff) |
claim-fix to streamer lock at end of file
-rw-r--r-- | streamer.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -485,17 +485,17 @@ streamer_thread (void *ctx) { streamer_lock (); memcpy (streambuffer+streambuffer_fill, buf, sz); streambuffer_fill += bytesread; - if (streambuffer_fill > 128000 && streamer_buffering) { - streamer_buffering = 0; - if (orig_streaming_song) { - int trk = pl_get_idx_of (orig_streaming_song); - if (trk != -1) { - messagepump_push (M_TRACKCHANGED, 0, trk, 0); - } + } + streamer_unlock (); + if (streambuffer_fill > 128000 && streamer_buffering || !orig_streaming_song) { + streamer_buffering = 0; + if (orig_streaming_song) { + int trk = pl_get_idx_of (orig_streaming_song); + if (trk != -1) { + messagepump_push (M_TRACKCHANGED, 0, trk, 0); } } } - streamer_unlock (); struct timeval tm2; gettimeofday (&tm2, NULL); |