DVD vob_start absolute rebase + rc.5.3 audit fixes

- ifo.rs: rebase VTS title VOBS to absolute disc LBA (file_start_lba +
  vtstt_vobs); fixes DVD rips opening on the menu region instead of the
  movie (e.g. SOTL). Adds absolute-placement regression test.
- aacs/boil.rs: add mk_from_pk primitive (PK -> MK via MKB walk).
- dvdnav/: nav-VM command decoder + start-cell resolver seam, parked
  behind USE_NAV_RESOLVER (kept compiled, never executed).
- mux: FVI src.byte within-sector per spec; Unknown colour -> CICP
  unspecified (2,2,2,1); demux clear PCS -> NORMAL; ts.rs feed() base
  reset + boundary provenance fix.
- Assorted audit fixes (doc/comment/test accuracy) across the crate.
This commit is contained in:
Matthew Jackson
2026-06-26 17:03:58 -07:00
parent d8c323bf9f
commit 835cc990ad
31 changed files with 1149 additions and 129 deletions
+9 -12
View File
@@ -107,20 +107,17 @@ impl PesFrame {
/// truncated `.pes` data would be accepted as a graceful end.
pub fn deserialize(r: &mut dyn std::io::Read) -> std::io::Result<Option<Self>> {
// Probe one byte first to distinguish clean EOF from a truncated
// header.
// header. Loop on EINTR so back-to-back signals don't fail a
// recoverable read — symmetric with read_exact's internal retry
// on the rest of the header and the data below.
let mut first = [0u8; 1];
match r.read(&mut first) {
Ok(0) => return Ok(None), // clean EOF, no frame started
Ok(_) => {}
Err(e) if e.kind() == std::io::ErrorKind::Interrupted => {
// Retry-once on EINTR before committing to the header read.
match r.read(&mut first) {
Ok(0) => return Ok(None),
Ok(_) => {}
Err(e) => return Err(e),
}
loop {
match r.read(&mut first) {
Ok(0) => return Ok(None), // clean EOF, no frame started
Ok(_) => break,
Err(e) if e.kind() == std::io::ErrorKind::Interrupted => continue,
Err(e) => return Err(e),
}
Err(e) => return Err(e),
}
let mut header = [0u8; 22]; // 1 + 8 + 1 + 8 + 4