Skip to content

Commit

Permalink
player: Also retry on ECONNRESET.
Browse files Browse the repository at this point in the history
It’s not entirely clear why or when ffmpeg returns this error.

Fixes PromyLOPh#735.
  • Loading branch information
PromyLOPh committed Mar 27, 2023
1 parent b11e5e0 commit 218f3f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 218f3f8

Please sign in to comment.