summaryrefslogtreecommitdiff
path: root/gst/fsrtpconference/fs-rtp-session.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2015-07-24 19:52:11 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-07-24 19:52:11 -0400
commitc4bca15b08a34874fefc06529df98b4609abbf3d (patch)
tree3b7c903e0b94f7448276a9a426410addd2d9ceb8 /gst/fsrtpconference/fs-rtp-session.c
parent28f0e7985cab9e305a32f830f974db0f049a8f51 (diff)
downloadfarstream-c4bca15b08a34874fefc06529df98b4609abbf3d.tar.gz
rtpstream: Accept all uncrypted packets if no crypto set
Diffstat (limited to 'gst/fsrtpconference/fs-rtp-session.c')
-rw-r--r--gst/fsrtpconference/fs-rtp-session.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index b040a5cb..ee0225f2 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -5518,6 +5518,32 @@ _srtpdec_request_key (GstElement *srtpdec, guint ssrc, gpointer user_data)
caps = fs_rtp_stream_get_srtp_caps_locked (stream);
g_object_unref (stream);
}
+ else
+ {
+ GList *item;
+ gboolean no_crypto = TRUE;
+ for (item = self->priv->streams; item; item = item->next)
+ if (fs_rtp_stream_requires_crypto_locked (item->data))
+ {
+ no_crypto = FALSE;
+ break;
+ }
+ if (no_crypto)
+ {
+ GST_DEBUG ("No stream found for SSRC %x, none of the streams require"
+ " crypto, so letting through", ssrc);
+ caps = gst_caps_new_simple ("application/x-srtp",
+ "srtp-cipher", G_TYPE_STRING, "null",
+ "srtcp-cipher", G_TYPE_STRING, "null",
+ "srtp-auth", G_TYPE_STRING, "null",
+ "srtcp-auth", G_TYPE_STRING, "null",
+ NULL);
+ }
+ else
+ {
+ GST_DEBUG ("Some streams require crypto, dropping packets");
+ }
+ }
FS_RTP_SESSION_UNLOCK (self);