summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2014-08-05 14:06:07 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-08-21 18:45:19 -0400
commit3c8039642448e7ad383b2cd588f54e396e1788a8 (patch)
treea7c0501510ab66aff77dbe08a48e56cb3ac4d694
parent334a71506cf0513f788e381ad9e3564ec5c11f0f (diff)
srtpdec: Add support for RTP/RTCP mixing if data arrives on RTCP pad
https://bugzilla.gnome.org/show_bug.cgi?id=734321
-rw-r--r--ext/srtp/gstsrtpdec.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index 5d42f4485..892f683ef 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)) {