LoadStreams() frame loss bug fix (#2222)
This commit is contained in:
1 parent
3ff783c18f
commit
7b833e37bf
1 file changed
+2
-1
+2
-1
@@ -300,7 +300,8 @@ class LoadStreams: # multiple IP or RTSP cameras
|
|||||||
# _, self.imgs[index] = cap.read()
|
# _, self.imgs[index] = cap.read()
|
||||||
cap.grab()
|
cap.grab()
|
||||||
if n == 4: # read every 4th frame
|
if n == 4: # read every 4th frame
|
||||||
_, self.imgs[index] = cap.retrieve()
|
success, im = cap.retrieve()
|
||||||
|
self.imgs[index] = im if success else self.imgs[index] * 0
|
||||||
n = 0
|
n = 0
|
||||||
time.sleep(0.01) # wait time
|
time.sleep(0.01) # wait time
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user