From 1c1a9cd97db7f7073144543947436e193fc98562 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 19 Jan 2019 15:31:52 +0100 Subject: player: Avoid deadlock When the play thread receives an error (ret < 0), it waits for aoplayCond. But if the buffer is full (decode thread waiting for aoplayCond), the player deadlocks. See #672. --- src/player.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/player.c b/src/player.c index 952ff18..e415023 100644 --- a/src/player.c +++ b/src/player.c @@ -528,6 +528,7 @@ void *BarAoPlayThread (void *data) { break; } else if (ret < 0) { /* wait for more frames */ + pthread_cond_broadcast (&player->aoplayCond); pthread_cond_wait (&player->aoplayCond, &player->aoplayLock); pthread_mutex_unlock (&player->aoplayLock); continue; -- cgit v1.2.3