summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-25 21:00:38 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-25 21:00:38 +0200
commited3630137c570df8b9c7c6855d168f078775c4ed (patch)
treefe4779752e4ac7280c410e0a89f196834ed315b5
parent3c807c1725e3a5498546f0418d5da9a68e07924c (diff)
streamer_reset thread safety fix
-rw-r--r--streamer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/streamer.c b/streamer.c
index 940891c7..c06391e5 100644
--- a/streamer.c
+++ b/streamer.c
@@ -1127,8 +1127,10 @@ void
streamer_reset (int full) { // must be called when current song changes by external reasons
src_lock ();
if (full) {
+ streamer_lock ();
streambuffer_pos = 0;
streambuffer_fill = 0;
+ streamer_unlock ();
}
src_remaining = 0;
src_reset (src);