Fix pacer broken by 5b6de6
This commit is contained in:
@@ -54,13 +54,13 @@ wivrn_pacer::wivrn_pacer(uint64_t frame_duration) :
|
||||
{
|
||||
std::unique_lock lock(compute_mutex);
|
||||
compute_cv.wait(lock);
|
||||
if (samples.empty())
|
||||
continue;
|
||||
for (const auto & time: frame_times_compute)
|
||||
{
|
||||
if (time.decoded > time.present)
|
||||
samples.push_back(time.decoded - time.present);
|
||||
}
|
||||
if (samples.empty())
|
||||
continue;
|
||||
auto it = samples.begin() + (samples.size() * 995) / 1000;
|
||||
|
||||
std::ranges::nth_element(samples, it);
|
||||
|
||||
Reference in New Issue
Block a user