forge
Explore
Log in

Don't you dare go Hollow

ec-mp4 QuickTime PCM over 2 channels: sound description version 2 is an lpcm entry, and ends with a constant 24 after frames-per-packet. Pinned ffmpeg 9.0.2 writes lpcm for 3/6/8 channels at s24le/s24be/s32be/f32le, with 0x18 in that last field every time; ours wrote in24 and 36 bytes, so the qt_pcm_hdr 5.1 cases failed

Browse files at this commit

156237af1ad8ac87b46d124eefe2b9c81b9b3943Ahmet Kaan GümüşParent: 0a54b85
crates/ec-mp4/src/mux.rsmodified+2 -0
@@ -1419,6 +1419,7 @@ fn sample_entry(
14191419 }
14201420
14211421 let (name, audio) = match info.params.audio() {
1422+ Some(audio) if qt_pcm(codec).is_some() && audio.layout.channel_count() > 2 => (b"lpcm", audio),
14221423 Some(audio) => (audio_entry(codec)?, audio),
14231424 None => {
14241425 return Err(Error::unsupported(
@@ -1468,6 +1469,7 @@ fn sample_entry(
14681469 out.extend_from_slice(&flags.to_be_bytes());
14691470 out.extend_from_slice(&(bytes * channels).to_be_bytes());
14701471 out.extend_from_slice(&1u32.to_be_bytes());
1472+ out.extend_from_slice(&24u32.to_be_bytes());
14711473 }
14721474 Some((bytes, little)) => {
14731475 out.extend_from_slice(&1u32.to_be_bytes()); // samples per packet