You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The time to wait if the queue is Full in FileVideoStream is said by a comment to be 10 ms but actually is 100 ms. This can lead to problems when the consumer is faster than the producer.
Additionally, if i try to read() of a stopped FileVideoStream the script will never leave read(). Maybe check if the thread is still running before extracting from the queue?
My fix is to adapt the read() function of the FileVideoStream class as follows:
def read(self):
# return next frame in the queue
if self.running():
return self.Q.get()
else:
return False
Not too sure whether this is a pretty or even good solution but it fixes the thread freezing the whole application when trying to read from an empty queue that will never have any additional entrys.
Activity
itsMeBrice commentedon Oct 4, 2018
Additionally, if i try to read() of a stopped FileVideoStream the script will never leave read(). Maybe check if the thread is still running before extracting from the queue?
itsMeBrice commentedon Oct 5, 2018
My fix is to adapt the read() function of the FileVideoStream class as follows:
Not too sure whether this is a pretty or even good solution but it fixes the thread freezing the whole application when trying to read from an empty queue that will never have any additional entrys.
jrosebr1 commentedon Oct 29, 2018
This has been resolved by #86.