fix: negative duration

This commit is contained in:
2025-01-27 22:57:16 +00:00
parent ceca1904d7
commit 4f40efa99c
2 changed files with 8 additions and 2 deletions

View File

@ -106,7 +106,9 @@ impl FileStore {
v_stream.map(|v| v.width as u32),
v_stream.map(|v| v.height as u32),
mime,
probe.as_ref().map(|p| p.duration),
probe
.as_ref()
.map(|p| if p.duration < 0. { 0.0 } else { p.duration }),
probe.as_ref().map(|p| p.bitrate as u32),
)
}