OutputControl: fix fail_timer check right after booting
Right after booting, the monotonic clock starts with a very small value, and AudioOutput::LockUpdate() may believe that the fail_timer has not recovered yet.
This commit is contained in:
parent
980187f856
commit
ae77542a11
2
NEWS
2
NEWS
@ -6,6 +6,8 @@ ver 0.19.10 (not yet released)
|
|||||||
- ffmpeg: improve seeking accuracy
|
- ffmpeg: improve seeking accuracy
|
||||||
* encoder
|
* encoder
|
||||||
- opus: fix bogus granulepos
|
- opus: fix bogus granulepos
|
||||||
|
* output
|
||||||
|
- fix failure to open device right after booting
|
||||||
* neighbor
|
* neighbor
|
||||||
- nfs: fix deadlock when connecting
|
- nfs: fix deadlock when connecting
|
||||||
|
|
||||||
|
@ -184,7 +184,8 @@ AudioOutput::LockUpdate(const AudioFormat audio_format,
|
|||||||
const ScopeLock protect(mutex);
|
const ScopeLock protect(mutex);
|
||||||
|
|
||||||
if (enabled && really_enabled) {
|
if (enabled && really_enabled) {
|
||||||
if (fail_timer.Check(REOPEN_AFTER * 1000)) {
|
if (!fail_timer.IsDefined() ||
|
||||||
|
fail_timer.Check(REOPEN_AFTER * 1000)) {
|
||||||
return Open(audio_format, mp);
|
return Open(audio_format, mp);
|
||||||
}
|
}
|
||||||
} else if (IsOpen())
|
} else if (IsOpen())
|
||||||
|
Loading…
Reference in New Issue
Block a user