mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-01 06:48:42 +00:00
fallbacksrc: Don't give up to running even if segment event is unavailable on blocking probe
The blocking probe will be called on buffer or downstream event. So segment event might not be available at that moment if it was called by downstream events.
This commit is contained in:
parent
53b7bdd4d5
commit
c62bdb171a
1 changed files with 8 additions and 6 deletions
|
@ -1557,12 +1557,14 @@ impl FallbackSrc {
|
|||
None => return Ok(()),
|
||||
};
|
||||
|
||||
let ev = pad
|
||||
.get_sticky_event(gst::EventType::Segment, 0)
|
||||
.ok_or_else(|| {
|
||||
gst_error!(CAT, obj: element, "Have no segment event");
|
||||
gst_error_msg!(gst::CoreError::Clock, ["Have no segment event"])
|
||||
})?;
|
||||
let ev = match pad.get_sticky_event(gst::EventType::Segment, 0) {
|
||||
Some(ev) => ev,
|
||||
None => {
|
||||
gst_warning!(CAT, obj: element, "Have no segment event yet");
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
|
||||
let segment = match ev.view() {
|
||||
gst::EventView::Segment(s) => s.get_segment(),
|
||||
_ => unreachable!(),
|
||||
|
|
Loading…
Reference in a new issue