diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2023-03-27 19:42:24 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2023-03-27 19:42:24 +0200 |
commit | 218f3f84965e648793bcb2b0b9d97de636de01e7 (patch) | |
tree | abc783e3288bab684493c735212d9ce1e49ba575 /src | |
parent | b11e5e07001fbbba619bb704668c7c8fdc1e2266 (diff) | |
download | pianobar-218f3f84965e648793bcb2b0b9d97de636de01e7.tar.gz pianobar-218f3f84965e648793bcb2b0b9d97de636de01e7.tar.bz2 pianobar-218f3f84965e648793bcb2b0b9d97de636de01e7.zip |
player: Also retry on ECONNRESET.
It’s not entirely clear why or when ffmpeg returns this error.
Fixes #735.
Diffstat (limited to 'src')
-rw-r--r-- | src/player.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c index 875f473..94d3cee 100644 --- a/src/player.c +++ b/src/player.c @@ -533,7 +533,9 @@ void *BarPlayerThread (void *data) { if (openFilter (player) && openDevice (player)) { changeMode (player, PLAYER_PLAYING); BarPlayerSetVolume (player); - retry = play (player) == AVERROR_INVALIDDATA && + const int ret = play (player); + retry = (ret == AVERROR_INVALIDDATA || + ret == -ECONNRESET) && !player->interrupted; } else { /* filter missing or audio device busy */ |