Make the drop count gate the verdict, not just the log

Round 3 counted frames the clip marks excluded and reported them at
finish. Counting is not bounding: the only other gate was a global
zero-frame check, and its error is additionally classified as a skippable
nav stub, so a title whose marks do not line up with its PES clock could
discard almost all of itself and still exit 0 — a two-hour feature
emitting seconds, which is the defect this change set already shipped
once. Dropping more than was kept is never a real join, so it now fails.

The demux sink had no zero-output guard at all, so a fully-dropped title
finished cleanly: a directory of zero-byte track files beside a populated
chapters document. It now refuses, keyed on frames having been OFFERED —
a chapters-only export, or a track class the title does not carry,
legitimately writes none, and two existing tests correctly said so.

A title set's placement group is the parsed number, so VTS_01_0.IFO and
VTS_1_0.IFO land on one key and the second silently overwrote the first's
constraint, placing a VOB where the IFO the reader uses does not point.
Refused rather than resolved by arrival order.
This commit is contained in:
Matthew Jackson
2026-08-05 18:25:47 -07:00
parent f4fb5c65e0
commit 0f61be00b7
4 changed files with 69 additions and 0 deletions
+10
View File
@@ -433,6 +433,16 @@ fn place_video_ts(vts: &mut DirNode, start: u32) -> Result<u32> {
{
let head = read_head(&vts.files[i].host, 0xC8)?;
let menu = be_u32(&head, 0xC0).unwrap_or(0);
// One group per title set. Two files whose names differ only in
// how the number is written — `VTS_01_0.IFO` and `VTS_1_0.IFO` —
// parse to the same group, and the second insert would overwrite
// the first's constraint, placing a VOB at an address the IFO the
// reader uses does not point to. Refuse instead of picking one.
if menu_req.contains_key(&c.group) || title_req.contains_key(&c.group) {
return Err(Error::DirNameCollision {
host: vts.files[i].disc_path.clone(),
});
}
if menu != 0 {
menu_req.insert(c.group, lba.saturating_add(menu));
}