summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-23 15:03:14 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-23 15:03:14 +0200
commit4c02e4b0bcf1d785fcfdef5648ba65eb714f7a7c (patch)
tree0e82f50c93b50d72b5d93e05093a4ba3d38dee67 /src/player.c
parent9e7903867979ebbf485c61cc95b69bd5ed1bfedb (diff)
downloadpianobar-4c02e4b0bcf1d785fcfdef5648ba65eb714f7a7c.tar.gz
pianobar-4c02e4b0bcf1d785fcfdef5648ba65eb714f7a7c.tar.bz2
pianobar-4c02e4b0bcf1d785fcfdef5648ba65eb714f7a7c.zip
client: Abort player thread while pause mode should be possible
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index 568d15a..8c7ea7b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -57,9 +57,9 @@ size_t BarPlayerCurlCb (void *ptr, size_t size, size_t nmemb, void *stream) {
/* FIXME: not the best solution to poll every second, but the easiest
* one I know... (pthread's conditions could be another solution) */
- if (player->doPause == 1) {
+ if (player->doPause) {
curl_easy_pause (player->audioFd, CURLPAUSE_ALL);
- while (player->doPause == 1) {
+ while (player->doPause && !player->doQuit) {
sleep (1);
}
curl_easy_pause (player->audioFd, CURLPAUSE_CONT);