mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[cscore] GetNextFrame: Wake up even if no frames received (#7244)
This commit is contained in:
@@ -79,7 +79,8 @@ Frame SourceImpl::GetCurFrame() {
|
|||||||
Frame SourceImpl::GetNextFrame() {
|
Frame SourceImpl::GetNextFrame() {
|
||||||
std::unique_lock lock{m_frameMutex};
|
std::unique_lock lock{m_frameMutex};
|
||||||
auto oldTime = m_frame.GetTime();
|
auto oldTime = m_frame.GetTime();
|
||||||
m_frameCv.wait(lock, [=, this] { return m_frame.GetTime() != oldTime; });
|
m_frameCv.wait(
|
||||||
|
lock, [=, this] { return oldTime == 0 || m_frame.GetTime() != oldTime; });
|
||||||
return m_frame;
|
return m_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user