mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-05 02:19:12 +00:00
WavPack: Add a TODO for unknown sample counts
This commit is contained in:
parent
17a9261449
commit
25dd1e7ba8
1 changed files with 6 additions and 0 deletions
|
@ -215,6 +215,12 @@ where
|
|||
offset += u64::from(block_header.block_size + 8);
|
||||
}
|
||||
|
||||
// TODO: Support unknown sample counts in WavPack
|
||||
if total_samples == !0 {
|
||||
log::warn!("Unable to calculate duration, unknown sample counts are not yet supported");
|
||||
return Ok(properties);
|
||||
}
|
||||
|
||||
if total_samples == 0 || properties.sample_rate == 0 {
|
||||
if parse_mode == ParsingMode::Strict {
|
||||
decode_err!(@BAIL WavPack, "Unable to calculate duration (sample count == 0 || sample rate == 0)")
|
||||
|
|
Loading…
Reference in a new issue