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:
|
def stop_preview(self) -> bool:
|
||||||
"""Stop the on board GPU camera preview."""
|
"""Stop the on board GPU camera preview."""
|
||||||
self.camera.stop_preview()
|
with self.lock:
|
||||||
self.state['preview_active'] = False
|
self.camera.stop_preview()
|
||||||
time.sleep(0.2)
|
self.state['preview_active'] = False
|
||||||
|
time.sleep(0.2)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def start_recording(
|
def start_recording(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue