Fixed captures trying to restart recording for a stopped stream
This commit is contained in:
parent
cbf709e8d8
commit
646dc24a91
2 changed files with 51 additions and 59 deletions
|
|
@ -313,6 +313,8 @@ class BaseCamera(object):
|
|||
self.frames_iterator = self.frames()
|
||||
logging.debug("Entering worker thread.")
|
||||
|
||||
self.state['stream_active'] = True
|
||||
|
||||
for frame in self.frames_iterator:
|
||||
self.frame = frame
|
||||
self.event.set() # send signal to clients
|
||||
|
|
@ -337,5 +339,7 @@ class BaseCamera(object):
|
|||
pass
|
||||
|
||||
logging.debug("BaseCamera worker thread exiting...")
|
||||
# Set stream_activate state
|
||||
self.state['stream_active'] = False
|
||||
# Reset thread
|
||||
self.thread = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue