Преглед на файлове

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)