commit 5a66a3f49b1e69158c3cad8360d2308c9ea2d8f3
Author: Paolo Pettinato <ppettina@cisco.com>
Date:   Mon Apr 11 19:37:00 2016 +0100

    rtpmux: fix sticky events handling in case of elements feeding GstBufferList in

diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c
index 302600c..98e8cbb 100644
--- a/gst/rtpmanager/gstrtpmux.c
+++ b/gst/rtpmanager/gstrtpmux.c
@@ -403,6 +403,9 @@ process_list_item (GstBuffer ** buffer, guint idx, gpointer user_data)
   return TRUE;
 }
 
+static gboolean resend_events (GstPad * pad, GstEvent ** event,
+    gpointer user_data);
+
 static GstFlowReturn
 gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
     GstBufferList * bufferlist)
@@ -410,6 +413,7 @@ gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
   GstRTPMux *rtp_mux;
   GstFlowReturn ret;
   GstRTPMuxPadPrivate *padpriv;
+  gboolean changed = FALSE;
   struct BufferListData bd;
 
   rtp_mux = GST_RTP_MUX (parent);
@@ -431,8 +435,17 @@ gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent,
   bufferlist = gst_buffer_list_make_writable (bufferlist);
   gst_buffer_list_foreach (bufferlist, process_list_item, &bd);
 
+  if (!bd.drop && pad != rtp_mux->last_pad) {
+    changed = TRUE;
+    g_clear_object (&rtp_mux->last_pad);
+    rtp_mux->last_pad = g_object_ref (pad);
+  }
+
   GST_OBJECT_UNLOCK (rtp_mux);
 
+  if (changed)
+    gst_pad_sticky_events_foreach (pad, resend_events, rtp_mux);
+
   if (bd.drop) {
     gst_buffer_list_unref (bufferlist);
     ret = GST_FLOW_OK;
