aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-26 23:58:41 +0200
committerMax Kellermann <max@duempel.org>2013-09-26 23:58:41 +0200
commitd8c5a63bc23e725ac6ee220a40a2c961b2d5ec69 (patch)
treecb1c2c1b530deecc2a9bb9e05fd5f63b7763da35 /src
parentbcb2db62c9eaa65591aa75e39987a1aa97f963c6 (diff)
downloadmpd-d8c5a63bc23e725ac6ee220a40a2c961b2d5ec69.tar.gz
mpd-d8c5a63bc23e725ac6ee220a40a2c961b2d5ec69.tar.xz
mpd-d8c5a63bc23e725ac6ee220a40a2c961b2d5ec69.zip
PlayerThread: unlock/lock in player_task()
Diffstat (limited to 'src')
-rw-r--r--src/PlayerThread.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 543c1fcae..02f60546f 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -912,8 +912,6 @@ player::SongBorder()
inline void
player::Run()
{
- pc.Unlock();
-
pipe = new MusicPipe();
StartDecoder(*pipe);
@@ -923,8 +921,6 @@ player::Run()
StopDecoder();
player_command_finished(pc);
delete pipe;
- GlobalEvents::Emit(GlobalEvents::PLAYLIST);
- pc.Lock();
return;
}
@@ -1095,10 +1091,6 @@ player::Run()
pc.state = PLAYER_STATE_STOP;
pc.Unlock();
-
- GlobalEvents::Emit(GlobalEvents::PLAYLIST);
-
- pc.Lock();
}
static void
@@ -1127,7 +1119,10 @@ player_task(gpointer arg)
case PLAYER_COMMAND_QUEUE:
assert(pc.next_song != NULL);
+ pc.Unlock();
do_play(pc, dc, buffer);
+ GlobalEvents::Emit(GlobalEvents::PLAYLIST);
+ pc.Lock();
break;
case PLAYER_COMMAND_STOP: