mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 06:50:59 +00:00
fmp4mux: Handle PTS<segment.start when requesting keyframes
This commit is contained in:
parent
e52d1fa317
commit
8e90abfebb
1 changed files with 5 additions and 2 deletions
|
@ -513,14 +513,17 @@ impl FMP4Mux {
|
||||||
//
|
//
|
||||||
// Otherwise if the current PTS is a fragment duration in the future, send the next one
|
// Otherwise if the current PTS is a fragment duration in the future, send the next one
|
||||||
// now.
|
// now.
|
||||||
let pts = segment.to_running_time(pts).expect("no running time");
|
|
||||||
|
|
||||||
let last_force_keyunit_time = match stream.last_force_keyunit_time {
|
let last_force_keyunit_time = match stream.last_force_keyunit_time {
|
||||||
None => return Ok(None),
|
None => return Ok(None),
|
||||||
Some(last_force_keyunit_time) if last_force_keyunit_time > pts => return Ok(None),
|
|
||||||
Some(last_force_keyunit_time) => last_force_keyunit_time,
|
Some(last_force_keyunit_time) => last_force_keyunit_time,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let pts = segment.to_running_time(pts);
|
||||||
|
if pts.map_or(true, |pts| last_force_keyunit_time > pts) {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
|
|
||||||
let fku_running_time = last_force_keyunit_time + settings.fragment_duration;
|
let fku_running_time = last_force_keyunit_time + settings.fragment_duration;
|
||||||
gst::debug!(
|
gst::debug!(
|
||||||
CAT,
|
CAT,
|
||||||
|
|
Loading…
Reference in a new issue