mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
parent
a54861b02c
commit
1b8b519543
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- **Vorbis**: Fix panic when reading properties of zero-length files ([issue](https://github.com/Serial-ATA/lofty-rs/issues/342)) ([PR](https://github.com/Serial-ATA/lofty-rs/pull/365))
|
||||
|
||||
## [0.18.2] - 2024-01-23
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -137,8 +137,11 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
if properties.bitrate_nominal > 0 {
|
||||
if length > 0 {
|
||||
properties.overall_bitrate = (file_length.saturating_mul(8) / length) as u32;
|
||||
}
|
||||
|
||||
if properties.bitrate_nominal > 0 {
|
||||
properties.audio_bitrate = (properties.bitrate_nominal as u64 / 1000) as u32;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue