From 185a642d010ba8430f153b9b6cb7eb7a86fb7e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Dec 2026 10:04:02 +0300 Subject: [PATCH] ec-mp4: drop stray 24 after QuickTime v2 lpcm block (5.1 PCM chan not found) Root cause: mux.rs sample_entry v2 branch wrote an extra u32 (24) after the 72-byte v2 block fields, so the chan box landed at offset 76 instead of 72. ffprobe reads the entry's extension size (72), finds a 24-byte box whose type is not chan, and reports channel_layout unknown for lpcm 5.1. ffmpeg 9.0.2 reference (6ch pcm_s24le .mov): lpcm entry is 96 bytes, v2 block ends at offset 72, chan box 0x18 'chan' tag 0x00010000 bitmap 0x3f at 72. Fix makes the entry 96 bytes with chan at 72, byte-equal to ffmpeg. --- crates/ec-mp4/src/mux.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/ec-mp4/src/mux.rs b/crates/ec-mp4/src/mux.rs index 36a00fa9..0ec15958 100644 --- a/crates/ec-mp4/src/mux.rs +++ b/crates/ec-mp4/src/mux.rs @@ -1478,7 +1478,6 @@ fn sample_entry( out.extend_from_slice(&flags.to_be_bytes()); out.extend_from_slice(&(bytes * channels).to_be_bytes()); out.extend_from_slice(&1u32.to_be_bytes()); - out.extend_from_slice(&24u32.to_be_bytes()); } Some((bytes, little)) => { out.extend_from_slice(&1u32.to_be_bytes()); // samples per packet