From f6aa4d85c19063b6516df203d37e85ba35203768 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 8 May 2013 18:19:48 -0400 Subject: [PATCH] pad: Only inforce STREAM_START, CAPS and SEGMENT ordering Previous patch was inforcing a complete ordering of the sticky events, while in fact, only STREAM_START, CAPS and SEGMENT events need proper ordering. See: https://bugzilla.gnome.org/show_bug.cgi?id=688188 --- gst/gstpad.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index bef2c53..ef8763f 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -4436,8 +4436,11 @@ store_sticky_event (GstPad * pad, GstEvent * event) } if (type < GST_EVENT_TYPE (ev->event)) { - g_warning (G_STRLOC ":%s:<%s:%s> Sticky event misordering detected", - G_STRFUNC, GST_DEBUG_PAD_NAME (pad)); + /* 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)) + g_warning (G_STRLOC ":%s:<%s:%s> Sticky event misordering detected", + G_STRFUNC, GST_DEBUG_PAD_NAME (pad)); break; } } -- 2.7.4