aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderControl.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-10 09:39:23 +0100
committerMax Kellermann <max@duempel.org>2013-01-10 10:01:18 +0100
commitad15ca7104ca299c87b6ac86441573a00c589fef (patch)
tree2b939699f60a1b929d3948fcd57933b10a6a95f0 /src/DecoderControl.cxx
parent53117ac204cd99d9695dc317a78527b43c8e87b7 (diff)
downloadmpd-ad15ca7104ca299c87b6ac86441573a00c589fef.tar.gz
mpd-ad15ca7104ca299c87b6ac86441573a00c589fef.tar.xz
mpd-ad15ca7104ca299c87b6ac86441573a00c589fef.zip
DecoderControl: take ownership of client_cond
Don't let the "client" pass its own GCond. This was not used consistently.
Diffstat (limited to 'src/DecoderControl.cxx')
-rw-r--r--src/DecoderControl.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DecoderControl.cxx b/src/DecoderControl.cxx
index 58d109483..2ffaf116f 100644
--- a/src/DecoderControl.cxx
+++ b/src/DecoderControl.cxx
@@ -28,7 +28,7 @@
#define G_LOG_DOMAIN "decoder_control"
struct decoder_control *
-dc_new(GCond *client_cond)
+dc_new()
{
struct decoder_control *dc = g_new(struct decoder_control, 1);
@@ -36,7 +36,7 @@ dc_new(GCond *client_cond)
dc->mutex = g_mutex_new();
dc->cond = g_cond_new();
- dc->client_cond = client_cond;
+ dc->client_cond = g_cond_new();
dc->state = DECODE_STATE_STOP;
dc->command = DECODE_COMMAND_NONE;
@@ -60,6 +60,7 @@ dc_free(struct decoder_control *dc)
if (dc->song != NULL)
song_free(dc->song);
+ g_cond_free(dc->client_cond);
g_cond_free(dc->cond);
g_mutex_free(dc->mutex);
g_free(dc->mixramp_start);