Fix a bug discovered by the synthetic video.
This commit is contained in:
@@ -153,6 +153,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
|
|||||||
except InvalidMediaError:
|
except InvalidMediaError:
|
||||||
raise InvalidMediaError("Impossible to retrieve timestamp of final i-frame.")
|
raise InvalidMediaError("Impossible to retrieve timestamp of final i-frame.")
|
||||||
|
|
||||||
|
assert head_iframe_ts <= tail_iframe_ts
|
||||||
|
|
||||||
checks.append(pos+head_iframe_ts-ts1)
|
checks.append(pos+head_iframe_ts-ts1)
|
||||||
|
|
||||||
subparts = []
|
subparts = []
|
||||||
@@ -199,6 +201,8 @@ def cut_recording(media: PreparedMedia, options: ProcessingOptions,
|
|||||||
if h264_head_ts is not None:
|
if h264_head_ts is not None:
|
||||||
h264_ts.append(h264_head_ts)
|
h264_ts.append(h264_head_ts)
|
||||||
|
|
||||||
|
if head_iframe_ts < tail_iframe_ts:
|
||||||
|
|
||||||
# Creating MKV file that corresponds to current part between I-frames
|
# Creating MKV file that corresponds to current part between I-frames
|
||||||
# Internal video with all streams (video, audio and subtitles)
|
# Internal video with all streams (video, audio and subtitles)
|
||||||
internal_mkv_name = f'part-{partnum:d}-internal.mkv'
|
internal_mkv_name = f'part-{partnum:d}-internal.mkv'
|
||||||
|
|||||||
Reference in New Issue
Block a user