gstreamer1-plugins-bad-free/0001-srtpdec-Add-support-for-RTP-RTCP-mixing-if-data-arri.patch
2015-03-06 16:49:49 +00:00

48 lines
1.5 KiB
Diff

From 3c8039642448e7ad383b2cd588f54e396e1788a8 Mon Sep 17 00:00:00 2001
From: Youness Alaoui <kakaroto@kakaroto.homelinux.net>
Date: Tue, 5 Aug 2014 14:06:07 -0400
Subject: [PATCH] srtpdec: Add support for RTP/RTCP mixing if data arrives on
RTCP pad
https://bugzilla.gnome.org/show_bug.cgi?id=734321
---
ext/srtp/gstsrtpdec.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index 5d42f44..892f683 100644
--- a/ext/srtp/gstsrtpdec.c
+++ b/ext/srtp/gstsrtpdec.c
@@ -560,20 +560,18 @@ validate_buffer (GstSrtpDec * filter, GstBuffer * buf, guint32 * ssrc,
gboolean * is_rtcp)
{
GstSrtpDecSsrcStream *stream = NULL;
+ GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
- if (!(*is_rtcp)) {
- GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
+ 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);
- 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);
+ *is_rtcp = FALSE;
+ goto have_ssrc;
}
+ gst_rtp_buffer_unmap (&rtpbuf);
}
if (rtcp_buffer_get_ssrc (buf, ssrc)) {
--
2.1.0