This crate has only one purpose: determining the playback duration of mp3 files.
use std::path::Path;
use mp3_duration;
let path = Path::new("music.mp3");
let duration = mp3_duration::from_path(&path).unwrap();
println!("File duration: {:?}", duration);
- Replaced usage of
failure
withthiserror
for error management (thanks @amesgen for the contribution)
- Fixed a bug where the MP3Duration error type was no longer public since version 0.1.8 (thanks @compenguy for the contribution)
- Minor performance improvements
- Fixed a crash when reading corrupted files with impossibly short MPEG frames