mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-02 23:38:45 +00:00
mp4mux: 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
fd910cb828
commit
ae4b49c668
1 changed files with 7 additions and 3 deletions
|
@ -230,9 +230,13 @@ fn stream_to_timescale(stream: &super::Stream) -> u32 {
|
|||
}
|
||||
}
|
||||
|
||||
(fps.numer() as u32)
|
||||
.mul_div_round(100, fps.denom() as u32)
|
||||
.unwrap_or(10_000)
|
||||
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