+
+static gboolean
+forward_sticky_events (GstPad * pad, GstEvent ** event, gpointer user_data)
+{
+ GstValve *valve = user_data;
+
+ if (!gst_pad_push_event (valve->srcpad, gst_event_ref (*event)))
+ valve->need_repush_sticky = TRUE;
+
+ return TRUE;
+}
+
+static void
+gst_valve_repush_sticky (GstValve * valve)
+{
+ valve->need_repush_sticky = FALSE;
+ gst_pad_sticky_events_foreach (valve->sinkpad, forward_sticky_events, valve);
+}
+