mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
fallbackswitch: only drop MISSING_DATA gap events pre queue
Regular gap events can be output by sources such as cefsrc in normal operation, and should not trigger an active pad change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/538>
This commit is contained in:
parent
b7d1c178a3
commit
19dcb8159a
2 changed files with 9 additions and 3 deletions
|
@ -39,6 +39,7 @@ pkg-config = "0.3"
|
|||
[features]
|
||||
default = ["libc"]
|
||||
v1_18 = ["gst-base/v1_18"]
|
||||
v1_20 = ["v1_18", "gst/v1_20"]
|
||||
# We already use 1.14 which is new enough for static build
|
||||
static = []
|
||||
|
||||
|
|
|
@ -963,6 +963,7 @@ impl AggregatorImpl for FallbackSwitch {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1_20")]
|
||||
fn sink_event_pre_queue(
|
||||
&self,
|
||||
agg: &Self::Type,
|
||||
|
@ -972,9 +973,13 @@ impl AggregatorImpl for FallbackSwitch {
|
|||
use gst::EventView;
|
||||
|
||||
match event.view() {
|
||||
EventView::Gap(_) => {
|
||||
gst_debug!(CAT, obj: agg_pad, "Dropping gap event");
|
||||
Ok(gst::FlowSuccess::Ok)
|
||||
EventView::Gap(gap) => {
|
||||
if gap.gap_flags().contains(gst::GapFlags::DATA) {
|
||||
gst_debug!(CAT, obj: agg_pad, "Dropping gap event");
|
||||
Ok(gst::FlowSuccess::Ok)
|
||||
} else {
|
||||
self.parent_sink_event_pre_queue(agg, agg_pad, event)
|
||||
}
|
||||
}
|
||||
_ => self.parent_sink_event_pre_queue(agg, agg_pad, event),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue