funnel: Always push all sticky events whenever we forward a serialized event
authorSebastian Dröge <sebastian@centricular.com>
Thu, 7 Jul 2016 16:41:49 +0000 (19:41 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 1 Nov 2016 19:01:28 +0000 (21:01 +0200)
Otherwise downstream will have an inconsistent set of sticky events at this
point, e.g. when a TAG event is pushed and downstream wants to relate it to
the stream by looking at the current STREAM_START event.

https://bugzilla.gnome.org/show_bug.cgi?id=768526

plugins/elements/gstfunnel.c

index bb7d768..894d00f 100644 (file)
@@ -397,8 +397,12 @@ gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
     GST_OBJECT_LOCK (funnel);
     fpad->got_eos = FALSE;
     GST_OBJECT_UNLOCK (funnel);
-  } else if (GST_EVENT_TYPE (event) == GST_EVENT_GAP) {
-    /* If no data is coming and we receive GAP event, need to forward sticky events. */
+  }
+
+  if (forward && GST_EVENT_IS_SERIALIZED (event)) {
+    /* If no data is coming and we receive serialized event, need to forward all sticky events.
+     * Otherwise downstream has an inconsistent set of sticky events when
+     * handling the new event. */
     unlock = TRUE;
     GST_PAD_STREAM_LOCK (funnel->srcpad);