Extend final shot to chunk boundary
This commit is contained in:
@@ -84,6 +84,10 @@ def normalize_sequence(value: Any, *, clip_count: int, default_seconds: float) -
|
||||
if text:
|
||||
slots.append({"start": start, "end": end, "text": text})
|
||||
slots.sort(key=lambda slot: (slot["start"], slot["end"]))
|
||||
if slots:
|
||||
# The final shot owns the end of every uniform-duration chunk;
|
||||
# there must be no unassigned tail on the editor track.
|
||||
slots[-1]["end"] = duration
|
||||
clips.append({"duration": duration, "slots": slots})
|
||||
return {"version": 1, "clips": clips}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user