aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_init.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-29 17:06:40 +0100
committerMax Kellermann <max@duempel.org>2009-10-29 17:06:40 +0100
commitbde3d1433997af8cc430f4b9d38e5bde97d3b760 (patch)
tree59ed180c3d0bf9f7b37065eea3fa13d7ffd72286 /src/output_init.c
parent1403172ef397c3dfc58a64c999a362cca977241b (diff)
downloadmpd-bde3d1433997af8cc430f4b9d38e5bde97d3b760.tar.gz
mpd-bde3d1433997af8cc430f4b9d38e5bde97d3b760.tar.xz
mpd-bde3d1433997af8cc430f4b9d38e5bde97d3b760.zip
output: consistently lock audio output objects
Always keep the audio_output object locked within the output thread, unless a plugin method is called. This fixes several race conditions.
Diffstat (limited to '')
-rw-r--r--src/output_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output_init.c b/src/output_init.c
index 5cb9ac92c..a7272bfc2 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -191,9 +191,9 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
assert(ao->filter != NULL);
ao->thread = NULL;
- notify_init(&ao->notify);
ao->command = AO_COMMAND_NONE;
ao->mutex = g_mutex_new();
+ ao->cond = g_cond_new();
ao->data = ao_plugin_init(plugin,
&ao->config_audio_format,