[audio] Fix: a track box belongs to the trak it is in (the hdlr of udta/meta overwrote the chapter track's)
This commit is contained in:
@@ -295,7 +295,9 @@ fn m4b_with_chapter_track(titles: &[&str], starts_ms: &[u32]) -> Vec<u8> {
|
||||
.concat(),
|
||||
);
|
||||
let mut f = ftyp(b"M4B ");
|
||||
f.extend(bx(b"moov", &[mvhd(1000, 600_000), audio, text].concat()));
|
||||
// iTunes metadata after the tracks, with its own `hdlr` (`mdir`): it belongs to no track.
|
||||
let udta = bx(b"udta", &bx(b"meta", &[full(0), hdlr(b"mdir")].concat()));
|
||||
f.extend(bx(b"moov", &[mvhd(1000, 600_000), audio, text, udta].concat()));
|
||||
f
|
||||
};
|
||||
let head_len = build(0).len() as u32;
|
||||
|
||||
Reference in New Issue
Block a user