cdg: typefind: Division by zero fix - fixed formatting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2137>
This commit is contained in:
tomaszmi 2025-03-24 16:44:44 +01:00
parent 5edcad3734
commit ddecf2812d

View file

@ -34,7 +34,11 @@ fn cdg_packets_ratio(typefind: &mut TypeFind, start: i64, len: i64) -> i64 {
None => break,
}
}
if total == 0 { 0 } else { (count * 100) / total }
if total == 0 {
0
} else {
(count * 100) / total
}
}
/* Some CDG files starts drawing right away and then pause for a while