aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderControl.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/DecoderControl.cxx
parentf6d74012b7a583bddf2e3b824193ade91fe09ce7 (diff)
downloadmpd-8e676db633aa8888c8408a91ef219d2261ef42e2.tar.gz
mpd-8e676db633aa8888c8408a91ef219d2261ef42e2.tar.xz
mpd-8e676db633aa8888c8408a91ef219d2261ef42e2.zip
Thread/Thread: replacement library for GThread
Diffstat (limited to 'src/DecoderControl.cxx')
-rw-r--r--src/DecoderControl.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/DecoderControl.cxx b/src/DecoderControl.cxx
index 07f6f9fde..330c791dd 100644
--- a/src/DecoderControl.cxx
+++ b/src/DecoderControl.cxx
@@ -27,8 +27,7 @@
#include <assert.h>
decoder_control::decoder_control()
- :thread(nullptr),
- state(DecoderState::STOP),
+ :state(DecoderState::STOP),
command(DecoderCommand::NONE),
song(nullptr),
replay_gain_db(0), replay_gain_prev_db(0),
@@ -124,13 +123,12 @@ decoder_control::Seek(double where)
void
decoder_control::Quit()
{
- assert(thread != nullptr);
+ assert(thread.IsDefined());
quit = true;
LockAsynchronousCommand(DecoderCommand::STOP);
- g_thread_join(thread);
- thread = nullptr;
+ thread.Join();
}
void