mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-21 00:06:44 +01:00
get a lock when copying frame for mjpeg stream
This commit is contained in:
parent
b67f323215
commit
8525f05f29
@ -266,8 +266,10 @@ def main():
|
|||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
# make a copy of the current detected objects
|
# make a copy of the current detected objects
|
||||||
detected_objects = DETECTED_OBJECTS.copy()
|
detected_objects = DETECTED_OBJECTS.copy()
|
||||||
# make a copy of the current frame
|
# lock and make a copy of the current frame
|
||||||
|
frame_lock.aquire()
|
||||||
frame = frame_arr.copy()
|
frame = frame_arr.copy()
|
||||||
|
frame_lock.release()
|
||||||
# convert to RGB for drawing
|
# convert to RGB for drawing
|
||||||
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
||||||
# draw the bounding boxes on the screen
|
# draw the bounding boxes on the screen
|
||||||
|
Loading…
Reference in New Issue
Block a user