Commit 2b654246 authored by Max Kellermann's avatar Max Kellermann

output_thread: unlock the mutex while calling cancel()

The method may take longer, and we shouldn't be holding the lock.
parent 8fa51faa
......@@ -640,8 +640,13 @@ static gpointer audio_output_task(gpointer arg)
case AO_COMMAND_CANCEL:
ao->chunk = NULL;
if (ao->open)
if (ao->open) {
g_mutex_unlock(ao->mutex);
ao_plugin_cancel(ao->plugin, ao->data);
g_mutex_lock(ao->mutex);
}
ao_command_finished(ao);
/* the player thread will now clear our music
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment