From 0344d61b26d8dd70a11c01744a2a4e2166e439f5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 24 Feb 2021 06:52:33 -0600 Subject: [PATCH] use gevent sleep to prevent mjpeg from blocking --- frigate/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/http.py b/frigate/http.py index 12e73f102..4d818d37c 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -356,7 +356,7 @@ def latest_frame(camera_name): def imagestream(detected_frames_processor, camera_name, fps, height, draw_options): while True: # max out at specified FPS - time.sleep(1/fps) + gevent.sleep(1/fps) frame = detected_frames_processor.get_current_frame(camera_name, draw_options) if frame is None: frame = np.zeros((height,int(height*16/9),3), np.uint8)