mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Only consider intel gpu stats error if None is returned
This commit is contained in:
parent
5f3829c34e
commit
f2f74f2d16
@ -197,8 +197,8 @@ async def set_gpu_stats(
|
||||
# intel QSV GPU
|
||||
intel_usage = get_intel_gpu_stats()
|
||||
|
||||
if intel_usage:
|
||||
stats["intel-qsv"] = intel_usage
|
||||
if intel_usage is not None:
|
||||
stats["intel-qsv"] = intel_usage or {"gpu": "", "mem": ""}
|
||||
else:
|
||||
stats["intel-qsv"] = {"gpu": "", "mem": ""}
|
||||
hwaccel_errors.append(args)
|
||||
@ -222,8 +222,8 @@ async def set_gpu_stats(
|
||||
# intel VAAPI GPU
|
||||
intel_usage = get_intel_gpu_stats()
|
||||
|
||||
if intel_usage:
|
||||
stats["intel-vaapi"] = intel_usage
|
||||
if intel_usage is not None:
|
||||
stats["intel-vaapi"] = intel_usage or {"gpu": "", "mem": ""}
|
||||
else:
|
||||
stats["intel-vaapi"] = {"gpu": "", "mem": ""}
|
||||
hwaccel_errors.append(args)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user