From 3aeb6b8440eb41e2b271f16f577284c4afdab14f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 11 Jun 2025 12:20:54 -0600 Subject: [PATCH] Use count correctly --- frigate/camera/maintainer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frigate/camera/maintainer.py b/frigate/camera/maintainer.py index 90a09646f..2c7163fd5 100644 --- a/frigate/camera/maintainer.py +++ b/frigate/camera/maintainer.py @@ -179,14 +179,15 @@ class CameraMaintainer(threading.Thread): return # pre-create shms - for i in range(10 if runtime else self.shm_count): + count = 10 if runtime else self.shm_count + for i in range(count): frame_size = config.frame_shape_yuv[0] * config.frame_shape_yuv[1] self.frame_manager.create(f"{config.name}_frame{i}", frame_size) capture_process = FrigateProcess( target=capture_camera, name=f"camera_capture:{name}", - args=(config, self.shm_count, self.camera_metrics[name]), + args=(config, count, self.camera_metrics[name]), ) capture_process.daemon = True self.camera_metrics[name].capture_process = capture_process