From 9fd13aad1169ace77a5e041fc9c2c3fcd7969909 Mon Sep 17 00:00:00 2001 From: Rob-Powell <7034920+Rob-Powell@users.noreply.github.com> Date: Thu, 5 Jan 2023 00:37:42 +1100 Subject: [PATCH] check stream specific hwaccel_args for gpu stats (#4869) * check stream specific hwaccel_args for gpu stats * fix indentation Co-authored-by: Nicolas Mowen * check special chars for linter Co-authored-by: Nicolas Mowen --- frigate/stats.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frigate/stats.py b/frigate/stats.py index 3b6683037..fef93823f 100644 --- a/frigate/stats.py +++ b/frigate/stats.py @@ -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: