check stream specific hwaccel_args for gpu stats (#4869)

* check stream specific hwaccel_args for gpu stats

* fix indentation

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* check special chars for linter

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
Rob-Powell 2023-01-05 00:37:42 +11:00 committed by GitHub
parent ebef38e408
commit 9fd13aad11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,6 +122,15 @@ async def set_gpu_stats(config: FrigateConfig, all_stats: dict[str, Any]) -> Non
if args and args not in hwaccel_args:
hwaccel_args.append(args)
for stream_input in camera.ffmpeg.inputs:
args = stream_input.hwaccel_args
if isinstance(args, list):
args = " ".join(args)
if args and args not in hwaccel_args:
hwaccel_args.append(args)
stats: dict[str, dict] = {}
for args in hwaccel_args: