mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-06-07 07:58:53 +00:00
utils/fallbackswitch: Use the correct segment when deciding to drop fallback buffers
Thanks to Jan Schmidt for noticing.
This commit is contained in:
parent
bf82e750f4
commit
331374fabe
1 changed files with 26 additions and 22 deletions
|
@ -219,8 +219,11 @@ impl FallbackSwitch {
|
|||
|
||||
// Drop all older buffers from the fallback sinkpad
|
||||
if let Some(fallback_sinkpad) = fallback_sinkpad {
|
||||
let fallback_segment = self
|
||||
.sinkpad
|
||||
let segment = fallback_sinkpad.get_segment();
|
||||
|
||||
// Might have no segment at all yet
|
||||
if segment.get_format() != gst::Format::Undefined {
|
||||
let fallback_segment = fallback_sinkpad
|
||||
.get_segment()
|
||||
.downcast::<gst::ClockTime>()
|
||||
.map_err(|_| {
|
||||
|
@ -245,6 +248,7 @@ impl FallbackSwitch {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let pad_states = self.pad_states.read().unwrap();
|
||||
let active_caps = pad_states.sinkpad.caps.as_ref().unwrap().clone();
|
||||
|
|
Loading…
Reference in a new issue