Fix LoadStreams missing frame bug (#4913)
This commit is contained in:
parent
daf16ecf31
commit
c8de4fe634
1 changed files with 3 additions and 1 deletions
|
|
@ -127,8 +127,10 @@ class LoadStreams:
|
||||||
if not self.threads[i].is_alive() or cv2.waitKey(1) == ord('q'): # q to quit
|
if not self.threads[i].is_alive() or cv2.waitKey(1) == ord('q'): # q to quit
|
||||||
self.close()
|
self.close()
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
LOGGER.warning(f'WARNING ⚠️ Waiting for stream {i}')
|
|
||||||
time.sleep(1 / min(self.fps))
|
time.sleep(1 / min(self.fps))
|
||||||
|
x = self.imgs[i]
|
||||||
|
if not x:
|
||||||
|
LOGGER.warning(f'WARNING ⚠️ Waiting for stream {i}')
|
||||||
|
|
||||||
# Get and remove the first frame from imgs buffer
|
# Get and remove the first frame from imgs buffer
|
||||||
if self.buffer:
|
if self.buffer:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue