mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Catch case where segment is bad length
This commit is contained in:
parent
b4d4adb75b
commit
b03a3e9f5f
@ -169,6 +169,11 @@ class RecordingMaintainer(threading.Thread):
|
||||
p = sp.run(ffprobe_cmd, capture_output=True)
|
||||
if p.returncode == 0 and p.stdout.decode():
|
||||
duration = float(p.stdout.decode().strip())
|
||||
else:
|
||||
duration = -1
|
||||
|
||||
# ensure duration is within expected length
|
||||
if 0 < duration < 600:
|
||||
end_time = start_time + datetime.timedelta(seconds=duration)
|
||||
self.end_time_cache[cache_path] = (end_time, duration)
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user