mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Write frames only if recording enabled
This commit is contained in:
parent
4104f7131c
commit
f2f11af1db
@ -345,8 +345,10 @@ class PreviewRecorder:
|
|||||||
self.output_frames: list[float] = []
|
self.output_frames: list[float] = []
|
||||||
|
|
||||||
# include first frame to ensure consistent duration
|
# include first frame to ensure consistent duration
|
||||||
self.output_frames.append(frame_time)
|
if self.config.record.enabled:
|
||||||
self.write_frame_to_cache(frame_time, frame)
|
self.output_frames.append(frame_time)
|
||||||
|
self.write_frame_to_cache(frame_time, frame)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
elif self.should_write_frame(current_tracked_objects, motion_boxes, frame_time):
|
elif self.should_write_frame(current_tracked_objects, motion_boxes, frame_time):
|
||||||
self.output_frames.append(frame_time)
|
self.output_frames.append(frame_time)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user