mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
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:
parent
c553ac7402
commit
fd910cb828
1 changed files with 7 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue