From ae47133360079ac96224f3a3c72c0e45c57127ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 9 May 2013 09:42:33 +0200 Subject: [PATCH] pad: No sticky events must arrive after EOS --- gst/gstpad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index ead0010..1c596a5 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -4435,10 +4435,12 @@ store_sticky_event (GstPad * pad, GstEvent * event) break; } - if (type < GST_EVENT_TYPE (ev->event)) { + if (type < GST_EVENT_TYPE (ev->event) || (type != GST_EVENT_TYPE (ev->event) + && GST_EVENT_TYPE (ev->event) == GST_EVENT_EOS)) { /* STREAM_START, CAPS and SEGMENT must be delivered in this order. By * storing the sticky ordered we can check that this is respected. */ - if (G_UNLIKELY (GST_EVENT_TYPE (ev->event) <= GST_EVENT_SEGMENT)) + if (G_UNLIKELY (GST_EVENT_TYPE (ev->event) <= GST_EVENT_SEGMENT + || GST_EVENT_TYPE (ev->event) == GST_EVENT_EOS)) g_warning (G_STRLOC ":%s:<%s:%s> Sticky event misordering, got '%s' before '%s'", G_STRFUNC, GST_DEBUG_PAD_NAME (pad), -- 2.7.4