Batch fix: media: the zero-rate audio test asserts that the read succeeds (#2182)

This commit is contained in:
aiongg
2026-10-24 00:37:13 +00:00
parent 5e0dfcfd41
commit 83af3ac56c
+1 -1
View File
@@ -1102,7 +1102,7 @@ mod tests {
assert!(tone.iter().any(|v| v.abs() > 0.05), "the tone is audible at 48 kHz"); assert!(tone.iter().any(|v| v.abs() > 0.05), "the tone is audible at 48 kHz");
// ...and a mix rate of 0 (which `audio_samples` itself turns away) returns a read of the // ...and a mix rate of 0 (which `audio_samples` itself turns away) returns a read of the
// requested length instead of dividing by it. // requested length instead of dividing by it.
let degenerate = pool.decode_audio(&footage, Tick::from_seconds_f64(0.1), 64, 0); let degenerate = pool.try_decode_audio(&footage, Tick::from_seconds_f64(0.1), 64, 0).unwrap();
assert_eq!(degenerate.len(), 128); assert_eq!(degenerate.len(), 128);
let _ = std::fs::remove_dir_all(&dir); let _ = std::fs::remove_dir_all(&dir);
} }