浏览代码

use gevent sleep to prevent mjpeg from blocking

Blake Blackshear 4 年之前
父节点
当前提交
0344d61b26
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      frigate/http.py

+ 1 - 1
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)