mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Catch case where recording starts right at end of request (#12956)
This commit is contained in:
parent
67ba3dbd8b
commit
13d121f443
@ -546,6 +546,11 @@ def vod_ts(camera_name, start_ts, end_ts):
|
||||
if recording.end_time > end_ts:
|
||||
duration -= int((recording.end_time - end_ts) * 1000)
|
||||
|
||||
if duration == 0:
|
||||
# this means the segment starts right at the end of the requested time range
|
||||
# and it does not need to be included
|
||||
continue
|
||||
|
||||
if 0 < duration < max_duration_ms:
|
||||
clip["keyFrameDurations"] = [duration]
|
||||
clips.append(clip)
|
||||
|
Loading…
Reference in New Issue
Block a user