Keep the seam plan to Blu-ray, and stop a missed crossing truncating a title
Two findings from the same escalation, both silent-wrong-output. The plan was built for every multi-clip title. Only a Blu-ray PlayItem's IN/OUT are positions in the clock the PES PTS runs on. HD-DVD fills the same fields from the XPL's title-relative times and a DVD's come from cell tables, so a plan built from them is an identity map with a drop filter: it suppresses the layer-break rebase inference performs, and drops whatever falls outside marks the PTS was never measured against. An earlier reading of this called HD-DVD safe because its marks are contiguous and every computed offset was zero — true, and irrelevant, because they were zero in the wrong clock. Gated on the content format, with a test using an HD-DVD-shaped table that the clock check alone accepts. The crossing test was also one-shot. A table whose clips restart their own bases could miss it, and a missed crossing STRANDS the track: every later frame falls outside the stranded clip's marks and is dropped for the rest of the title. Counting drops, which is all the previous round added, does not bound them. A table that is not one advancing clock is now refused outright and falls back to inference, which is the documented safe path for those titles. Also from the same round: read_sectors added an unchecked lba + i, where callers deliberately saturate their LBAs — a wrap folds the read back to a low sector and hands the muxer another file's bytes. classify added 1 to two numbers parsed verbatim out of a filename. read_head used a single read() where a short read on a network mount silently records no placement constraint at all. And the page-cache eviction added last round released only the read that crossed its threshold rather than everything accumulated, so seven eighths of what was read stayed pinned.
This commit is contained in:
+6
-2
@@ -1335,8 +1335,12 @@ impl<W: Write + Seek> MkvMuxer<W> {
|
||||
///
|
||||
/// No-op for a title with fewer than two clips or without usable marks —
|
||||
/// DVD, HD-DVD and file sources keep the inference path.
|
||||
pub fn set_clips(&mut self, clips: &[crate::disc::Clip]) {
|
||||
self.continuity = TimelineContinuity::with_clips(clips);
|
||||
pub fn set_clips(
|
||||
&mut self,
|
||||
clips: &[crate::disc::Clip],
|
||||
content_format: crate::disc::ContentFormat,
|
||||
) {
|
||||
self.continuity = TimelineContinuity::with_clips(clips, content_format);
|
||||
}
|
||||
|
||||
/// Write a single frame.
|
||||
|
||||
Reference in New Issue
Block a user