aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerControl.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 18:42:14 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 19:29:47 +0200
commit8e676db633aa8888c8408a91ef219d2261ef42e2 (patch)
tree9e61e37ab5d181e90e89c5d4ced99c3434b3976c /src/PlayerControl.cxx
parentf6d74012b7a583bddf2e3b824193ade91fe09ce7 (diff)
downloadmpd-8e676db633aa8888c8408a91ef219d2261ef42e2.tar.gz
mpd-8e676db633aa8888c8408a91ef219d2261ef42e2.tar.xz
mpd-8e676db633aa8888c8408a91ef219d2261ef42e2.zip
Thread/Thread: replacement library for GThread
Diffstat (limited to 'src/PlayerControl.cxx')
-rw-r--r--src/PlayerControl.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx
index 56b44f1f8..cf5789f10 100644
--- a/src/PlayerControl.cxx
+++ b/src/PlayerControl.cxx
@@ -23,6 +23,8 @@
#include "Song.hxx"
#include "DecoderControl.hxx"
+#include <glib.h>
+
#include <cmath>
#include <assert.h>
@@ -31,7 +33,6 @@ player_control::player_control(unsigned _buffer_chunks,
unsigned _buffered_before_play)
:buffer_chunks(_buffer_chunks),
buffered_before_play(_buffered_before_play),
- thread(nullptr),
command(PlayerCommand::NONE),
state(PlayerState::STOP),
error_type(PlayerError::NONE),
@@ -100,11 +101,10 @@ player_control::UpdateAudio()
void
player_control::Kill()
{
- assert(thread != NULL);
+ assert(thread.IsDefined());
LockSynchronousCommand(PlayerCommand::EXIT);
- g_thread_join(thread);
- thread = NULL;
+ thread.Join();
idle_add(IDLE_PLAYER);
}