diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-03-21 17:50:40 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-03-21 19:30:32 +0100 |
commit | 0e3609a6e12cc44a4d83cabed910422c2e91a5b8 (patch) | |
tree | 9ab3d104ee9dd7d5c69c9cb9f8302b20cc787e7e | |
parent | 17d90b453f375ef6983940ba65ce27680f533954 (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.c | 12 |
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; |