1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-01-07 15:31:21 +00:00

Only round end_time of removal segments

We don't actually care if we chop out a segment after a keyframe,
just that the next segment should start with one. So only the
end_time requires rounding, not the start_time.
This commit is contained in:
Quantum
2024-12-26 03:22:18 -05:00
parent cfc29f62c8
commit a9abae0a92
2 changed files with 1 additions and 6 deletions

View File

@@ -341,11 +341,6 @@ class ModifyChaptersPP(FFmpegPostProcessor):
result.append(c)
continue
start_frame = bisect.bisect_left(keyframes, c['start_time'])
if start_frame >= len(keyframes):
continue
c['start_time'] = keyframes[start_frame]
if c['end_time'] < keyframes[-1]:
c['end_time'] = keyframes[bisect.bisect_right(keyframes, c['end_time']) - 1]
result.append(c)