Skip to content

Commit 1cf6426

Browse files
authored
Update datasets.py
Video errors may occur.
1 parent bc48457 commit 1cf6426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def __next__(self):
200200
# Read video
201201
self.mode = 'video'
202202
ret_val, img0 = self.cap.read()
203-
if not ret_val:
203+
while not ret_val:
204204
self.count += 1
205205
self.cap.release()
206206
if self.count == self.nf: # last video

0 commit comments

Comments
 (0)