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:
Jan Schmidt 2015-11-01 00:04:27 +11:00
parent a5001312cd
commit ca22e60b91

View file

@ -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",