Commit 1cf1e40c authored by Richard Bowman's avatar Richard Bowman 🔬
Browse files

Added a lock to stop_preview for good measure

parent ec50d245
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ class StreamingCamera(BaseCamera):

    def stop_preview(self) -> bool:
        """Stop the on board GPU camera preview."""
        with self.lock:
            self.camera.stop_preview()
            self.state['preview_active'] = False
            time.sleep(0.2)