mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
pad: Mark sticky events as sent on not-linked
Instead of re-sending sticky events over and over to a not-linked pad, mark them as sent the first time. If the not-linked came from downstream, it already received the events. If the pad is actually not-linked, the sticky events will be rescheduled when the pad is linked anyway.
This commit is contained in:
parent
c9881d191e
commit
f6943a3cdf
1 changed files with 4 additions and 3 deletions
|
@ -3713,11 +3713,12 @@ push_sticky (GstPad * pad, PadEvent * ev, gpointer user_data)
|
||||||
break;
|
break;
|
||||||
case GST_FLOW_NOT_LINKED:
|
case GST_FLOW_NOT_LINKED:
|
||||||
/* not linked is not a problem, we are sticky so the event will be
|
/* not linked is not a problem, we are sticky so the event will be
|
||||||
* sent later but only for non-EOS events */
|
* rescheduled to be sent later on re-link, but only for non-EOS events */
|
||||||
GST_DEBUG_OBJECT (pad, "pad was not linked, mark pending");
|
GST_DEBUG_OBJECT (pad, "pad was not linked, mark pending");
|
||||||
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS)
|
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS) {
|
||||||
data->ret = GST_FLOW_OK;
|
data->ret = GST_FLOW_OK;
|
||||||
GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PENDING_EVENTS);
|
ev->received = TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
GST_DEBUG_OBJECT (pad, "result %s, mark pending events",
|
GST_DEBUG_OBJECT (pad, "result %s, mark pending events",
|
||||||
|
|
Loading…
Reference in a new issue