mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +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
a5001312cd
commit
ca22e60b91
1 changed files with 4 additions and 3 deletions
|
@ -3729,11 +3729,12 @@ push_sticky (GstPad * pad, PadEvent * ev, gpointer user_data)
|
|||
break;
|
||||
case GST_FLOW_NOT_LINKED:
|
||||
/* 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");
|
||||
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS)
|
||||
if (GST_EVENT_TYPE (event) != GST_EVENT_EOS) {
|
||||
data->ret = GST_FLOW_OK;
|
||||
GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PENDING_EVENTS);
|
||||
ev->received = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
GST_DEBUG_OBJECT (pad, "result %s, mark pending events",
|
||||
|
|
Loading…
Reference in a new issue