diff options
author | Max Kellermann <max@duempel.org> | 2009-10-29 17:06:40 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-29 17:06:40 +0100 |
commit | bde3d1433997af8cc430f4b9d38e5bde97d3b760 (patch) | |
tree | 59ed180c3d0bf9f7b37065eea3fa13d7ffd72286 /src/output_init.c | |
parent | 1403172ef397c3dfc58a64c999a362cca977241b (diff) | |
download | mpd-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.c | 2 |
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, |