Skip to content

Commit

Permalink
Update datasets.py
Browse files Browse the repository at this point in the history
Video errors may occur.
  • Loading branch information
gmt710 authored and glenn-jocher committed Dec 2, 2021
1 parent e8f8f2b commit 6f82270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __next__(self):
# Read video
self.mode = 'video'
ret_val, img0 = self.cap.read()
if not ret_val:
while not ret_val:
self.count += 1
self.cap.release()
if self.count == self.nf: # last video
Expand Down

0 comments on commit 6f82270

Please sign in to comment.