diff options
author | Max Kellermann <max@duempel.org> | 2009-11-02 17:12:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-02 17:12:00 +0100 |
commit | 64a481d8732cc45b01b70d18cf95e1374b7dcba7 (patch) | |
tree | 5be1cb521897d47d2cdbcfbb7ae068b154ab2d5a /src/output_control.c | |
parent | 93d8f9f00e838b4b0054ea6487d8810bfa60628d (diff) | |
download | mpd-64a481d8732cc45b01b70d18cf95e1374b7dcba7.tar.gz mpd-64a481d8732cc45b01b70d18cf95e1374b7dcba7.tar.xz mpd-64a481d8732cc45b01b70d18cf95e1374b7dcba7.zip |
{decoder,player}_control: removed duplicate wakeups
Don't wake up the target thread in every iteration of the wait() loop.
Waking it up once, right after the command has been set, must be
enough.
Diffstat (limited to '')
-rw-r--r-- | src/output_control.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output_control.c b/src/output_control.c index 973baa463..c54ce4f92 100644 --- a/src/output_control.c +++ b/src/output_control.c @@ -40,7 +40,6 @@ struct notify audio_output_client_notify; static void ao_command_wait(struct audio_output *ao) { while (ao->command != AO_COMMAND_NONE) { - g_cond_signal(ao->cond); g_mutex_unlock(ao->mutex); notify_wait(&audio_output_client_notify); g_mutex_lock(ao->mutex); @@ -51,6 +50,7 @@ static void ao_command(struct audio_output *ao, enum audio_output_command cmd) { assert(ao->command == AO_COMMAND_NONE); ao->command = cmd; + g_cond_signal(ao->cond); ao_command_wait(ao); } |