summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-03-21 17:50:40 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-03-21 19:30:32 +0100
commit0e3609a6e12cc44a4d83cabed910422c2e91a5b8 (patch)
tree9ab3d104ee9dd7d5c69c9cb9f8302b20cc787e7e
parent17d90b453f375ef6983940ba65ce27680f533954 (diff)
rtpsession: Fix another instance of sticky event misordering warnings
Make sure that the sync_src pad has caps before the segment event. Otherwise we might get a segment event before caps from the receive RTCP pad, and then later when receiving RTCP packets will set caps. This will results in a sticky event misordering warning This fixes warnings in the rtpaux unit test but also in the rtpaux and rtx examples in tests/examples/rtp https://bugzilla.gnome.org/show_bug.cgi?id=746445
-rw-r--r--gst/rtpmanager/gstrtpsession.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 49a752196..191fb7d78 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -1773,6 +1773,18 @@ gst_rtp_session_event_recv_rtcp_sink (GstPad * pad, GstObject * parent,
GST_EVENT_TYPE_NAME (event));
switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_SEGMENT:
+ /* Make sure that the sync_src pad has caps before the segment event.
+ * Otherwise we might get a segment event before caps from the receive
+ * RTCP pad, and then later when receiving RTCP packets will set caps.
+ * This will results in a sticky event misordering warning
+ */
+ if (!gst_pad_has_current_caps (rtpsession->sync_src)) {
+ GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp");
+ gst_pad_set_caps (rtpsession->sync_src, caps);
+ gst_caps_unref (caps);
+ }
+ /* fall through */
default:
ret = gst_pad_push_event (rtpsession->sync_src, event);
break;