don't let subtitles run close to the end of a segment

This commit is contained in:
j 2026-01-29 11:54:51 +01:00
commit c33502fad6

View file

@ -251,7 +251,8 @@ def compose(clips, fragment, target=150, base=1024, voice_over=None, options=Non
else:
vo_b = None
while int((vo['duration'] + sub_offset) * fps) > scene_duration:
min_end = 2
while int((vo['duration'] + sub_offset + min_end) * fps) > scene_duration:
if not vo_keys:
vo = None
break