Skip to content

Commit

Permalink
use gevent sleep to prevent mjpeg from blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Feb 25, 2021
1 parent 0e84677 commit 0344d61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frigate/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0344d61

Please sign in to comment.