From 8fa51faa389426f1edd285e20c3ddbdf4aebce71 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Wed, 20 Jul 2011 18:52:00 +0200
Subject: player_thread: lock the player while setting the bite_rate

---
 src/player_thread.c | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/player_thread.c')

diff --git a/src/player_thread.c b/src/player_thread.c
index cce51c1a7..a89e59908 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -618,7 +618,9 @@ play_chunk(struct song *song, struct music_chunk *chunk,
 		return true;
 	}
 
+	player_lock();
 	pc.bit_rate = chunk->bit_rate;
+	player_unlock();
 
 	/* send the chunk to the audio outputs */
 
-- 
cgit v1.2.3