Skip to content

Commit 7fe36bc

Browse files
committed
stop probing for cameras once one fails
1 parent 9dd3904 commit 7fe36bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/local_video/publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def list_cameras(max_camera_index: int) -> None:
141141
cap = cv2.VideoCapture(index)
142142
try:
143143
if not cap.isOpened():
144-
continue
144+
break
145145

146146
found_any = True
147147
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))

0 commit comments

Comments
 (0)