Update LoadImages ret_val=False handling (#5852)
Video errors may occur.
This commit is contained in:
1 parent
e8f8f2b903
commit
1679aacdc7
1 file changed
+1
-1
+1
-1
@@ -200,7 +200,7 @@ class LoadImages:
|
||||
# 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
|
||||
|
||||
Reference in new issue
Block a user