summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-07-21 21:54:02 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-07-21 21:54:02 +0200
commitc1f95cebfda67f0700cb2730a9a72b49811dac66 (patch)
tree1307dcb6bfaa7b14a0becd21f1f47bd810c493bd
parentd16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c (diff)
downloadpianobar-c1f95cebfda67f0700cb2730a9a72b49811dac66.tar.gz
pianobar-c1f95cebfda67f0700cb2730a9a72b49811dac66.tar.bz2
pianobar-c1f95cebfda67f0700cb2730a9a72b49811dac66.zip
Fix player retry logic
If retry is triggered once and openStream fails after that retry is never set to false, resulting in an infinite loop that cannot be interrupted by the user.
-rw-r--r--src/player.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c
index 5421310..0476a6b 100644
--- a/src/player.c
+++ b/src/player.c
@@ -416,8 +416,9 @@ void *BarPlayerThread (void *data) {
player_t * const player = data;
intptr_t pret = PLAYER_RET_OK;
- bool retry = false;
+ bool retry;
do {
+ retry = false;
if (openStream (player)) {
if (openFilter (player) && openDevice (player)) {
retry = play (player) == AVERROR_INVALIDDATA;