forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'simplify/w0u-ac3' into simplify/w0

Browse files at this commit

e19c60213335bd84ed5d0916738cfad1c3c7be9eAhmet Kaan GümüşParent: f66492065a1e04
crates/ec-ac3/tests/it/real_library.rsmodified+7 -1
@@ -98,7 +98,13 @@ fn fate_ac3_and_eac3_match_ffmpeg() {
98 for path in files {98 for path in files {
99 let name = path.file_name().unwrap().to_string_lossy().into_owned();99 let name = path.file_name().unwrap().to_string_lossy().into_owned();
100 let (ours, decoded_channels) = decode(&path);100 let (ours, decoded_channels) = decode(&path);
101- let theirs = reference(&path);101+ let mut theirs = reference(&path);
102+ let extra = theirs.len().saturating_sub(ours.len());
103+ assert!(
104+ extra <= 1536 * decoded_channels,
105+ "{name}: ffmpeg has {extra} extra samples, more than one truncated frame"
106+ );
107+ theirs.truncate(ours.len());
102 assert_eq!(ours.len(), theirs.len(), "{name}: sample count vs ffmpeg");108 assert_eq!(ours.len(), theirs.len(), "{name}: sample count vs ffmpeg");
103 assert!(!ours.is_empty(), "{name}: nothing decoded");109 assert!(!ours.is_empty(), "{name}: nothing decoded");
104 110