remove region in process when skipping

This commit is contained in:
Blake Blackshear 2020-01-14 20:39:42 -06:00
parent 8dab9e17dd
commit 94878315ae

View File

@ -117,6 +117,11 @@ class RegionPrepper(threading.Thread):
if frame is None:
print("RegionPrepper: frame_time not in frame_cache")
with self.camera.regions_in_process_lock:
self.camera.regions_in_process[resize_request['frame_time']] -= 1
if self.camera.regions_in_process[resize_request['frame_time']] == 0:
del self.camera.regions_in_process[resize_request['frame_time']]
self.camera.skipped_region_tracker.update()
continue
# make a copy of the region