summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Pettinato <ppettina@cisco.com>2016-04-12 09:41:00 +0000
committerSebastian Dröge <sebastian@centricular.com>2016-04-13 09:44:17 +0300
commit76a44519c752404a3135ff5f3f2fb5244263ca1e (patch)
tree95fa91ee4eaecdf46ded276fea944a3f31acb288
parent9e1d248f523f13b2cfc21db34be12225dc733c06 (diff)
downloadgstreamer-plugins-good-76a44519c752404a3135ff5f3f2fb5244263ca1e.tar.gz
rtpmux: Forward sticky events on buffer lists too, not only on buffers
https://bugzilla.gnome.org/show_bug.cgi?id=764933
-rw-r--r--gst/rtpmanager/gstrtpmux.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c
index 302600cc9..98e8cbb92 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;