diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-07-21 21:54:02 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-07-21 21:54:02 +0200 |
commit | c1f95cebfda67f0700cb2730a9a72b49811dac66 (patch) | |
tree | 1307dcb6bfaa7b14a0becd21f1f47bd810c493bd /src | |
parent | d16d6eb53869e8380ccfbe7dbc2c09d98c40ab6c (diff) | |
download | pianobar-windows-c1f95cebfda67f0700cb2730a9a72b49811dac66.tar.gz pianobar-windows-c1f95cebfda67f0700cb2730a9a72b49811dac66.tar.bz2 pianobar-windows-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/player.c | 3 |
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; |