fmp4mux: For video with N/1001 framerates use N as timescale

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3049

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/981>
This commit is contained in:
Sebastian Dröge 2022-11-18 16:07:11 +02:00
parent c553ac7402
commit fd910cb828

View file

@ -471,9 +471,13 @@ fn caps_to_timescale(caps: &gst::CapsRef) -> u32 {
}
}
if fps.denom() == 1001 {
fps.numer() as u32
} else {
(fps.numer() as u32)
.mul_div_round(100, fps.denom() as u32)
.unwrap_or(10_000)
}
} else if let Ok(rate) = s.get::<i32>("rate") {
rate as u32
} else {