Repository navigation
media: derive audio-only AVI PCM duration from indexed blocks - #4042
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…uration # Conflicts: # crates/media/src/craft_source.rs
EffectCraft now reports the duration of all indexed PCM blocks in an audio-only AVI. The reader already uses complete blocks to place PCM chunks during playback. Using the same count for the probe prevents a stale declared length from hiding decodable samples or extending the clip into silence.
Part of storytold/craft-libs#778 and storytold/craft-libs#781. Scoped claim
The regression generates two 48 kHz PCM chunks containing 7 and 13 samples. Before the fix the same file reported 1, 20, or 200 samples, depending on the header. It now reports 20 samples for each header and reads the last sample followed by silence. The change combines cleanly with #4037 and is based on main after #4030.
cargo test --locked -p effectcraft-mediapassed with 210 unit and 75 integration tests, plus one ignored unit test. Optional FFmpeg-dependent cases skipped because FFmpeg was unavailable on PATH.Summary by CodeRabbit