Fix a bug discovered by the synthetic video.

This commit is contained in:
Frédéric Tronel
2026-08-31 21:28:07 +02:00
parent c17ccb6563
commit 814c64cc52
+4
View File
@@ -153,6 +153,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
except InvalidMediaError:
raise InvalidMediaError("Impossible to retrieve timestamp of final i-frame.")
assert head_iframe_ts <= tail_iframe_ts
checks.append(pos+head_iframe_ts-ts1)
subparts = []
@@ -199,6 +201,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
if h264_head_ts is not None:
h264_ts.append(h264_head_ts)
if head_iframe_ts < tail_iframe_ts:
# Creating MKV file that corresponds to current part between I-frames
# Internal video with all streams (video, audio and subtitles)
internal_mkv_name = f'part-{partnum:d}-internal.mkv'