Skip to content

Commit

Permalink
fix recoder using infinite memory
Browse files Browse the repository at this point in the history
  • Loading branch information
roflcoopter committed Sep 6, 2020
1 parent 86937bd commit 0af18c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def __init__(self, config, frame_buffer):
) = self.get_stream_characteristics(self.config.camera.stream_url)

self.resolution = self.stream_width, self.stream_height
frame_buffer.maxsize = self.stream_fps * self.config.recorder.lookback
frame_buffer_size = self.stream_fps * self.config.recorder.lookback
if frame_buffer_size > 0:
frame_buffer.maxsize = self.stream_fps * self.config.recorder.lookback

self._logger.info(
f"Resolution: {self.stream_width}x{self.stream_height} "
Expand Down

0 comments on commit 0af18c2

Please sign in to comment.