We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d372e2 commit 9faa904Copy full SHA for 9faa904
src/gopro/mod.rs
@@ -390,7 +390,7 @@ impl GoPro {
390
}
391
392
393
- if first_tsus.is_some() && last_tsus.is_some() && count > 0 {
+ if first_tsus.is_some() && last_tsus.is_some() && count > 0 && last_tsus.unwrap() > first_tsus.unwrap() {
394
Some((last_tsus.unwrap() as f64 - first_tsus.unwrap() as f64) / (count - last_len).max(1) as f64 / 1000.0)
395
} else if count > 0 {
396
Some(total_duration_ms / count as f64)
0 commit comments