Commit f5631763 authored by Jose Antonio Santos Cadenas's avatar Jose Antonio Santos Cadenas Committed by Sebastian Dröge

rtpssrcdemux: Add support for reduce size rtcp

According to RFC 5506, reduce size packages can be sent, this
packages may not be compound, so we need to add support for
getting ssrc from other types of packages.

https://bugzilla.gnome.org/show_bug.cgi?id=750327
parent f8f23bbf
......@@ -678,7 +678,7 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstObject * parent,
demux = GST_RTP_SSRC_DEMUX (parent);
if (!gst_rtcp_buffer_validate (buf))
if (!gst_rtcp_buffer_validate_reduced (buf))
goto invalid_rtcp;
gst_rtcp_buffer_map (buf, GST_MAP_READ, &rtcp);
......@@ -687,7 +687,9 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstObject * parent,
goto invalid_rtcp;
}
/* first packet must be SR or RR or else the validate would have failed */
/* first packet must be SR or RR, or in case of a reduced size RTCP packet
* it must be APP, RTPFB or PSFB feeadback, or else the validate would
* have failed */
switch (gst_rtcp_packet_get_type (&packet)) {
case GST_RTCP_TYPE_SR:
/* get the ssrc so that we can route it to the right source pad */
......@@ -697,6 +699,11 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstObject * parent,
case GST_RTCP_TYPE_RR:
ssrc = gst_rtcp_packet_rr_get_ssrc (&packet);
break;
case GST_RTCP_TYPE_APP:
case GST_RTCP_TYPE_RTPFB:
case GST_RTCP_TYPE_PSFB:
ssrc = gst_rtcp_packet_fb_get_sender_ssrc (&packet);
break;
default:
goto unexpected_rtcp;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment