mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
srtpdec: Make sure to send caps events downstream before any segment events
Upstream might not give us a caps event (dtlssrtpdec) because it might be an RTP/RTCP mixed stream, but we split the two streams anyway and should report proper caps downstream if possible. Fixes "sticky event misordering" warnings with dtlssrtpdec.
This commit is contained in:
parent
cf210bac27
commit
dafa11b9d2
1 changed files with 16 additions and 0 deletions
|
@ -796,6 +796,14 @@ gst_srtp_dec_sink_event_rtp (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
return ret;
|
||||
case GST_EVENT_SEGMENT:
|
||||
/* Make sure to send a caps event downstream before the segment event,
|
||||
* even if upstream didn't */
|
||||
if (!gst_pad_has_current_caps (pad)) {
|
||||
GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtp");
|
||||
|
||||
gst_pad_event_default (pad, parent, gst_event_new_caps (caps));
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
filter->rtp_has_segment = TRUE;
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
|
@ -823,6 +831,14 @@ gst_srtp_dec_sink_event_rtcp (GstPad * pad, GstObject * parent,
|
|||
gst_event_unref (event);
|
||||
return ret;
|
||||
case GST_EVENT_SEGMENT:
|
||||
/* Make sure to send a caps event downstream before the segment event,
|
||||
* even if upstream didn't */
|
||||
if (!gst_pad_has_current_caps (pad)) {
|
||||
GstCaps *caps = gst_caps_new_empty_simple ("application/x-rtcp");
|
||||
|
||||
gst_pad_event_default (pad, parent, gst_event_new_caps (caps));
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
filter->rtcp_has_segment = TRUE;
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
|
|
Loading…
Reference in a new issue