Fix birdseye crash when dynamically adding a camera (#18821)

This commit is contained in:
Josh Hawkins
2025-08-16 10:20:33 -05:00
committed by Blake Blackshear
parent 847b03e71b
commit 7c8164aa99
4 changed files with 60 additions and 28 deletions
+7 -1
View File
@@ -133,7 +133,7 @@ class OutputProcess(FrigateProcess):
# check if there is an updated config
updates = config_subscriber.check_for_updates()
if "add" in updates:
if CameraConfigUpdateEnum.add in updates:
for camera in updates["add"]:
jsmpeg_cameras[camera] = JsmpegCamera(
cam_config, self.stop_event, websocket_server
@@ -141,6 +141,12 @@ class OutputProcess(FrigateProcess):
preview_recorders[camera] = PreviewRecorder(cam_config)
preview_write_times[camera] = 0
if (
self.config.birdseye.enabled
and self.config.cameras[camera].birdseye.enabled
):
birdseye.add_camera(camera)
(topic, data) = detection_subscriber.check_for_update(timeout=1)
now = datetime.datetime.now().timestamp()