EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge remote-tracking branch 'origin/main' into pr1736-avi-backend
tylerjenningsw3390e2fff7b2
diff --cc Cargo.lockindex 9d818a649,a6611ffba..d7b774557--- a/Cargo.lock+++ b/Cargo.lock@@@ -2055,10 -2233,20 +2232,20 @@@ version = "0.4.1source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693"+ [[package]]+ name = "filetime"+ version = "0.2.29"+ source = "registry+https://github.com/rust-lang/crates.io-index"+ checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759"+ dependencies = [+ "cfg-if",+ "libc",+ ]+[[package]]name = "filmcraft-aac"-version = "0.1.1"-source = "git+https://github.com/storytold/filmcraft?rev=2c5ba7a72619935f0481f99d59409e0d1844b234#2c5ba7a72619935f0481f99d59409e0d1844b234"+version = "0.8.0"+source = "git+https://github.com/storytold/filmcraft?rev=09aaf9bf15d510eda1c413c0ccabb1d7e08b41c5#09aaf9bf15d510eda1c413c0ccabb1d7e08b41c5"dependencies = ["filmcraft-bitstream","thiserror 2.0.21",diff --cc crates/media/src/pool.rsindex 99f288286,1f1587059..ed89bf7e8--- a/crates/media/src/pool.rs+++ b/crates/media/src/pool.rs@@@ -512,7 -516,12 +516,12 @@@ impl MediaPoollet path: Arc<str> = footage.path.as_str().into();let src = self.inner.source(&path).ok_or("the file can't be opened")?;let s0 = start.to_units_floor(rate as i64);- let native = src.info().audio.as_ref().map_or(rate, |a| a.sample_rate);+ let native = src.info().audio().map_or(rate, |a| a.sample_rate);+ // The header's rate scales the samples read: 0xFFFFFFFF Hz made one conform chunk about+ // 47 GB (#2141). Real audio is 1–768 kHz.+ if native != 0 && !(MIN_SAMPLE_RATE..=MAX_SAMPLE_RATE).contains(&native) {+ return Err(format!("a sample rate of {native} Hz is outside {MIN_SAMPLE_RATE}–{MAX_SAMPLE_RATE} Hz"));+ }if native == 0 || rate == 0 || native == rate {return read_stereo(&src, s0, frames, rate);}