PlayerThread: make chunk allocation error non-fatal in SendSilence()
Fixes abort after seeking on fast machines.
This commit is contained in:
parent
ba8e579e9b
commit
5eb0cbc887
1
NEWS
1
NEWS
|
@ -1,4 +1,5 @@
|
||||||
ver 0.19.17 (not yet released)
|
ver 0.19.17 (not yet released)
|
||||||
|
* fix spurious seek error "Failed to allocate silence buffer"
|
||||||
* replay gain: fix "replay_gain_handler mixer" setting
|
* replay gain: fix "replay_gain_handler mixer" setting
|
||||||
|
|
||||||
ver 0.19.16 (2016/06/13)
|
ver 0.19.16 (2016/06/13)
|
||||||
|
|
|
@ -486,8 +486,12 @@ Player::SendSilence()
|
||||||
|
|
||||||
MusicChunk *chunk = buffer.Allocate();
|
MusicChunk *chunk = buffer.Allocate();
|
||||||
if (chunk == nullptr) {
|
if (chunk == nullptr) {
|
||||||
LogError(player_domain, "Failed to allocate silence buffer");
|
/* this is non-fatal, because this means that the
|
||||||
return false;
|
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
|
#ifndef NDEBUG
|
||||||
|
|
Loading…
Reference in New Issue