From c776375d41664d3cb766e87d4956f77247111baa 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 09:37:13 +0300 Subject: [PATCH] B5: ec-probe reads PcmS24Be/PcmS32Be Demux now maps A_PCM/INT/BIG to S24Be/S32Be, which ec-probe did not read (is_pcm and pcm() lacked them), so those tracks would fail to decode. Added the BE arms mirroring the LE ones. Only BE 24/32 PCM tracks are affected. Evidence: cargo check and clippy ec-probe; orchestrator runs goldens. --- crates/ec-probe/src/decoder.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/ec-probe/src/decoder.rs b/crates/ec-probe/src/decoder.rs index 62d9bbb1..c1ee8ff2 100644 --- a/crates/ec-probe/src/decoder.rs +++ b/crates/ec-probe/src/decoder.rs @@ -373,7 +373,9 @@ fn is_pcm(codec: CodecId) -> bool { | CodecId::PcmS16Le | CodecId::PcmS16Be | CodecId::PcmS24Le + | CodecId::PcmS24Be | CodecId::PcmS32Le + | CodecId::PcmS32Be | CodecId::PcmF32Le ) } @@ -462,10 +464,18 @@ fn pcm(codec: CodecId, data: &[u8], out: &mut Vec) { let v = i32::from_le_bytes([0, c[0], c[1], c[2]]); v as f32 / 2147483648.0 })), + CodecId::PcmS24Be => out.extend(data.as_chunks::<3>().0.iter().map(|c| { + let v = i32::from_be_bytes([c[0], c[1], c[2], 0]); + v as f32 / 2147483648.0 + })), CodecId::PcmS32Le => out.extend( data.as_chunks::<4>().0.iter() .map(|c| i32::from_le_bytes([c[0], c[1], c[2], c[3]]) as f32 / 2147483648.0), ), + CodecId::PcmS32Be => out.extend( + data.as_chunks::<4>().0.iter() + .map(|c| i32::from_be_bytes([c[0], c[1], c[2], c[3]]) as f32 / 2147483648.0), + ), CodecId::PcmF32Le => out.extend( data.as_chunks::<4>().0.iter() .map(|c| f32::from_le_bytes([c[0], c[1], c[2], c[3]])),