mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-07 09:38:25 +02:00
Minor fixes, Alternative rendering mode
This commit is contained in:
@@ -78,8 +78,8 @@ public:
|
||||
unique_lock<std::mutex> lock(_mtx);
|
||||
|
||||
_lock.wait(lock, [&]
|
||||
{ return _count > count || !waitFlag; });
|
||||
return waitFlag;
|
||||
{ return _count > count || !waitFlag.load(); });
|
||||
return waitFlag.load();
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
||||
@@ -42,6 +42,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t latestId()
|
||||
{
|
||||
int index = _latest.load();
|
||||
if (index < 0)
|
||||
return 0;
|
||||
return _ids[index];
|
||||
}
|
||||
|
||||
bool latest(AVFrame **frame, uint32_t *id)
|
||||
{
|
||||
_reading.store(_latest.load());
|
||||
|
||||
Reference in New Issue
Block a user