mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 21:58:22 +03:00
fix: wrong index for FPS replacement in preset-http-jpeg-generic
parse_preset_input() uses input[len(_user_agent_args) + 1] to find
the FPS placeholder, but preset-http-jpeg-generic does not include
_user_agent_args at the start of its list (only preset-http-mjpeg-generic
does). The FPS placeholder '{}' is at index 1, not index 3.
This means the detect_fps value overwrites '-1' (the stream_loop
argument) instead of the '{}' FPS placeholder, so the preset always
uses the literal string '{}' as the framerate.
This commit is contained in:
parent
5a214eb0d1
commit
fc348007f4
@ -436,7 +436,7 @@ def parse_preset_input(arg: Any, detect_fps: int) -> list[str]:
|
||||
|
||||
if arg == "preset-http-jpeg-generic":
|
||||
input = PRESETS_INPUT[arg].copy()
|
||||
input[len(_user_agent_args) + 1] = str(detect_fps)
|
||||
input[1] = str(detect_fps)
|
||||
return input
|
||||
|
||||
return PRESETS_INPUT.get(arg, None)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user