Fix build issues on macos

This commit is contained in:
Brett Williams
2025-03-13 23:15:12 -05:00
parent 46e2b5f713
commit aefbad852e
3 changed files with 65 additions and 2 deletions

View File

@@ -93,8 +93,11 @@ class ChromaPreviewer(QWidget):
], dtype=np.uint8)
def update_frame(self):
ret, frame = self.cap.read()
if not ret:
try:
ret, frame = self.cap.read()
if not ret:
return
except AttributeError:
return
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)