PlayerThread: make chunk allocation error non-fatal in SendSilence()

Fixes abort after seeking on fast machines.
This commit is contained in:
Max Kellermann 2016-07-05 17:44:45 +02:00
parent ba8e579e9b
commit 5eb0cbc887
2 changed files with 7 additions and 2 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
ver 0.19.17 (not yet released)
* fix spurious seek error "Failed to allocate silence buffer"
* replay gain: fix "replay_gain_handler mixer" setting
ver 0.19.16 (2016/06/13)

View File

@ -486,8 +486,12 @@ Player::SendSilence()
MusicChunk *chunk = buffer.Allocate();
if (chunk == nullptr) {
LogError(player_domain, "Failed to allocate silence buffer");
return false;
/* this is non-fatal, because this means that the
decoder has filled to buffer completely meanwhile;
by ignoring the error, we work around this race
condition */
LogDebug(player_domain, "Failed to allocate silence buffer");
return true;
}
#ifndef NDEBUG