aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-29 22:20:46 +0200
committerMax Kellermann <max@duempel.org>2009-06-29 22:20:46 +0200
commit1937d29228a9727fb76faeffd66a74c6167238e0 (patch)
tree1decfcc95358cbaa91b663908f7744228d53b94a
parent40851b7cac34abb708d12ce5bf110ffb15af6819 (diff)
downloadmpd-1937d29228a9727fb76faeffd66a74c6167238e0.tar.gz
mpd-1937d29228a9727fb76faeffd66a74c6167238e0.tar.xz
mpd-1937d29228a9727fb76faeffd66a74c6167238e0.zip
output_thread: don't play next chunk after command==PAUSE
When the PAUSE loop ends, re-check the next command before calling ao_play() again.
-rw-r--r--src/output_thread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index acedd863e..d414ba8d5 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -246,7 +246,11 @@ static gpointer audio_output_task(gpointer arg)
case AO_COMMAND_PAUSE:
ao_pause(ao);
- break;
+ /* don't "break" here: this might cause
+ ao_play() to be called when command==CLOSE
+ ends the paused state - "continue" checks
+ the new command first */
+ continue;
case AO_COMMAND_CANCEL:
ao->chunk = NULL;