mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
funnel: Only forward sticky events on GAP events if needed
That is, if the active pad changed and if forwarding of sticky events is requested at all. We otherwise forward events too often.
This commit is contained in:
parent
9f982e2d75
commit
528fbfe7c1
1 changed files with 7 additions and 5 deletions
|
@ -401,11 +401,13 @@ gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
/* If no data is coming and we receive GAP event, need to forward sticky events. */
|
/* If no data is coming and we receive GAP event, need to forward sticky events. */
|
||||||
unlock = TRUE;
|
unlock = TRUE;
|
||||||
GST_PAD_STREAM_LOCK (funnel->srcpad);
|
GST_PAD_STREAM_LOCK (funnel->srcpad);
|
||||||
GST_OBJECT_LOCK (funnel);
|
|
||||||
gst_object_replace ((GstObject **) & funnel->last_sinkpad,
|
if ((funnel->last_sinkpad == NULL) || (funnel->forward_sticky_events
|
||||||
GST_OBJECT (pad));
|
&& (funnel->last_sinkpad != pad))) {
|
||||||
GST_OBJECT_UNLOCK (funnel);
|
gst_object_replace ((GstObject **) & funnel->last_sinkpad,
|
||||||
gst_pad_sticky_events_foreach (pad, forward_events, funnel->srcpad);
|
GST_OBJECT (pad));
|
||||||
|
gst_pad_sticky_events_foreach (pad, forward_events, funnel->srcpad);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forward)
|
if (forward)
|
||||||
|
|
Loading…
Reference in a new issue