From 8e676db633aa8888c8408a91ef219d2261ef42e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 18:42:14 +0200 Subject: Thread/Thread: replacement library for GThread --- src/PlayerControl.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/PlayerControl.cxx') 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 + #include #include @@ -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); } -- cgit v1.2.3