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/decoder_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/decoder_control.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder_control.c b/src/decoder_control.c index 10f576c5c..9844b6918 100644 --- a/src/decoder_control.c +++ b/src/decoder_control.c @@ -44,10 +44,8 @@ dc_deinit(struct decoder_control *dc) static void dc_command_wait_locked(struct decoder_control *dc) { - while (dc->command != DECODE_COMMAND_NONE) { - decoder_signal(dc); + while (dc->command != DECODE_COMMAND_NONE) player_wait_decoder(dc); - } } void @@ -62,6 +60,7 @@ static void dc_command_locked(struct decoder_control *dc, enum decoder_command cmd) { dc->command = cmd; + decoder_signal(dc); dc_command_wait_locked(dc); } |