From 2dbec2967e779ce4fbf720b29d21dd450356f4b6 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 9 Jul 2024 06:37:42 -0600 Subject: [PATCH] Improve frame safety --- frigate/object_processing.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index aed850fe3..aed157f46 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -851,15 +851,16 @@ class CameraState: with self.current_frame_lock: self.tracked_objects = tracked_objects - self.current_frame_time = frame_time self.motion_boxes = motion_boxes self.regions = regions if current_frame is not None: + self.current_frame_time = frame_time self._current_frame = current_frame - if self.previous_frame_id is not None: - self.frame_manager.close(self.previous_frame_id) + if self.previous_frame_id is not None: + self.frame_manager.close(self.previous_frame_id) + self.previous_frame_id = frame_id