mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
srtpdec: Add support for RTP/RTCP mixing if data arrives on RTCP pad
https://bugzilla.gnome.org/show_bug.cgi?id=734321
This commit is contained in:
parent
334a71506c
commit
3c80396424
1 changed files with 8 additions and 10 deletions
|
@ -560,20 +560,18 @@ validate_buffer (GstSrtpDec * filter, GstBuffer * buf, guint32 * ssrc,
|
||||||
gboolean * is_rtcp)
|
gboolean * is_rtcp)
|
||||||
{
|
{
|
||||||
GstSrtpDecSsrcStream *stream = NULL;
|
GstSrtpDecSsrcStream *stream = NULL;
|
||||||
|
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
|
||||||
|
|
||||||
if (!(*is_rtcp)) {
|
if (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
|
||||||
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
|
if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
|
||||||
|
|| gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
|
||||||
|
*ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
|
||||||
|
|
||||||
if (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
|
|
||||||
if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
|
|
||||||
|| gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
|
|
||||||
*ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
|
|
||||||
|
|
||||||
gst_rtp_buffer_unmap (&rtpbuf);
|
|
||||||
goto have_ssrc;
|
|
||||||
}
|
|
||||||
gst_rtp_buffer_unmap (&rtpbuf);
|
gst_rtp_buffer_unmap (&rtpbuf);
|
||||||
|
*is_rtcp = FALSE;
|
||||||
|
goto have_ssrc;
|
||||||
}
|
}
|
||||||
|
gst_rtp_buffer_unmap (&rtpbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtcp_buffer_get_ssrc (buf, ssrc)) {
|
if (rtcp_buffer_get_ssrc (buf, ssrc)) {
|
||||||
|
|
Loading…
Reference in a new issue