Make sure that device_id is in _is_recording and hasn't been removed by another thread before checking it
This commit is contained in:
parent
9d36688a61
commit
81a200bd4e
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ class CameraPlugin(Plugin):
|
||||||
|
|
||||||
self.fire_event(CameraRecordingStartedEvent(**evt_args))
|
self.fire_event(CameraRecordingStartedEvent(**evt_args))
|
||||||
|
|
||||||
while self._is_recording[device_id].is_set():
|
while device_id in self._is_recording and self._is_recording[device_id].is_set():
|
||||||
if duration and time.time() - recording_started_time >= duration \
|
if duration and time.time() - recording_started_time >= duration \
|
||||||
or n_frames and captured_frames >= n_frames:
|
or n_frames and captured_frames >= n_frames:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue