ImageBuffer: Fix counting idle slots

This commit is contained in:
2026-03-03 20:40:36 +01:00
parent d566a54457
commit 7f9f03da5f

View File

@@ -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