aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/PlayerThread.cxx12
2 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index c299c00e6..707a57532 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
ver 0.18.3 (2013/??/??)
+* fix stuck MPD after song change (0.18.2 regression)
ver 0.18.2 (2013/11/07)
* protocol:
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index cb3d6a9a4..6fb41bf35 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -36,8 +36,6 @@
#include "util/Domain.hxx"
#include "Log.hxx"
-#include <glib.h>
-
#include <string.h>
static constexpr Domain player_domain("player");
@@ -1043,8 +1041,14 @@ Player::Run()
output thread is still busy, so it's
okay */
- /* XXX synchronize in a better way */
- g_usleep(10000);
+ pc.Lock();
+
+ /* wake up the decoder (just in case it's
+ waiting for space in the MusicBuffer) and
+ wait for it */
+ dc.Signal();
+ dc.WaitForDecoder();
+ continue;
} else if (IsDecoderAtNextSong()) {
/* at the beginning of a new song */