mux: wire TrueHD channel probe into iso:// mux setup
correct_truehd_channels() probes the first DECRYPTED access units of the chosen title (TrueHD PIDs, bounded 8 MiB read of the first extent) and sets AudioStream.channels from the MLP major sync — fixing the MPLS audio_format understatement (5.1 declared on a 7.1/Atmos TrueHD track). Regenerates the basic codec label for the corrected count; richer editorial labels are left untouched. Wired in resolve.rs input() for iso:// after decrypt_with (the m2ts is only decryptable post-key), using a fresh reader so the mux reader is undisturbed. generate_audio_label made pub(crate).
This commit is contained in:
+8
-1
@@ -216,8 +216,15 @@ pub fn input(url: &str, opts: &InputOptions) -> io::Result<Box<dyn crate::pes::S
|
||||
}
|
||||
.into());
|
||||
}
|
||||
let title = disc.titles[idx].clone();
|
||||
// Correct TrueHD channel counts (MPLS understates 7.1/Atmos as 5.1)
|
||||
// by probing the first DECRYPTED access units of the chosen title.
|
||||
// A fresh reader avoids disturbing the mux reader below.
|
||||
let keys = disc.decrypt_keys();
|
||||
if let Ok(probe) = crate::io::file_sector_source::FileSectorSource::open(path) {
|
||||
let mut dec = crate::sector::DecryptingSectorSource::new(probe, keys.clone());
|
||||
crate::disc::correct_truehd_channels(&mut dec, &mut disc.titles[idx]);
|
||||
}
|
||||
let title = disc.titles[idx].clone();
|
||||
let format = disc.content_format;
|
||||
// ISO file: 16 MiB batch — sequential read from fast
|
||||
// storage, no bad sectors. Measured optimum on the rip1
|
||||
|
||||
Reference in New Issue
Block a user