mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Catch ffprobe empty stdout
This commit is contained in:
parent
60ad38261b
commit
0d94e2a550
@ -167,7 +167,7 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
f"{cache_path}",
|
f"{cache_path}",
|
||||||
]
|
]
|
||||||
p = sp.run(ffprobe_cmd, capture_output=True)
|
p = sp.run(ffprobe_cmd, capture_output=True)
|
||||||
if p.returncode == 0:
|
if p.returncode == 0 and p.stdout.decode():
|
||||||
duration = float(p.stdout.decode().strip())
|
duration = float(p.stdout.decode().strip())
|
||||||
end_time = start_time + datetime.timedelta(seconds=duration)
|
end_time = start_time + datetime.timedelta(seconds=duration)
|
||||||
self.end_time_cache[cache_path] = (end_time, duration)
|
self.end_time_cache[cache_path] = (end_time, duration)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user