ImageBuffer: Fix counting idle slots
This commit is contained in:
@@ -109,12 +109,13 @@ ZeroCopyReturnValue *ImageBuffer::GetImageSlot() {
|
||||
auto i = free_slots.front();
|
||||
free_slots.pop();
|
||||
|
||||
if (v[i].status == ImageBufferEntryStatus::Idle)
|
||||
--slots_idle;
|
||||
v[i].status = ImageBufferEntryStatus::InPreparation;
|
||||
v[i].image_number = INT64_MIN;
|
||||
v[i].image_size = 0;
|
||||
v[i].indexed = false;
|
||||
|
||||
--slots_idle;
|
||||
++slots_preparation;
|
||||
|
||||
// Wait for any preview thread currently reading this one
|
||||
|
||||
Reference in New Issue
Block a user