livesync: Correctly calculate fallback buffer duration from framerate

Numerator and denominator were switched.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1108>
This commit is contained in:
Sebastian Dröge 2023-02-28 12:52:11 +02:00
parent 542c7e12b8
commit ff2f7a8505

View file

@ -484,7 +484,7 @@ impl State {
.and_then(|s| s.get::<gst::Fraction>("framerate").ok()) .and_then(|s| s.get::<gst::Fraction>("framerate").ok())
.and_then(|framerate| { .and_then(|framerate| {
gst::ClockTime::SECOND gst::ClockTime::SECOND
.mul_div_round(framerate.numer() as u64, framerate.denom() as u64) .mul_div_round(framerate.denom() as u64, framerate.numer() as u64)
}) })
.filter(|&dur| dur > 8.mseconds() && dur < 10.seconds()) .filter(|&dur| dur > 8.mseconds() && dur < 10.seconds())
// Otherwise, half the configured latency // Otherwise, half the configured latency