Added a lock to stop_preview for good measure
This commit is contained in:
parent
ec50d245ab
commit
1cf1e40c54
1 changed files with 4 additions and 3 deletions
|
|
@ -243,9 +243,10 @@ class StreamingCamera(BaseCamera):
|
|||
|
||||
def stop_preview(self) -> bool:
|
||||
"""Stop the on board GPU camera preview."""
|
||||
self.camera.stop_preview()
|
||||
self.state['preview_active'] = False
|
||||
time.sleep(0.2)
|
||||
with self.lock:
|
||||
self.camera.stop_preview()
|
||||
self.state['preview_active'] = False
|
||||
time.sleep(0.2)
|
||||
return True
|
||||
|
||||
def start_recording(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue