From 73ebdb888e047b14ceea19ce1a0bbbeff0cd7b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 14 Apr 2016 22:32:05 -0700 Subject: [PATCH] srtpdec: also check for "roc" in caps Currently, gst_srtp_dec_sink_setcaps is happy if the "roc" field is not provided in the caps. If it is not provided the stream will be properly inserted in the hash table with a default "roc". Then, when the first buffer arrives validate_buffer will find an existing stream in the hash table and will not signal request-key, not allowing the user to provide a "roc". This patch expects "roc" in gst_srtp_dec_sink_setcaps, if not found a request-key will be signaled and the user will be able to provide all the srtp fields, including "roc". https://bugzilla.gnome.org/show_bug.cgi?id=765079 --- ext/srtp/gstsrtpdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c index cbf4b0c2c5..b97094a243 100644 --- a/ext/srtp/gstsrtpdec.c +++ b/ext/srtp/gstsrtpdec.c @@ -787,6 +787,7 @@ gst_srtp_dec_sink_setcaps (GstPad * pad, GstObject * parent, ps = gst_caps_get_structure (caps, 0); if (gst_structure_has_field_typed (ps, "ssrc", G_TYPE_UINT) && + gst_structure_has_field_typed (ps, "roc", G_TYPE_UINT) && gst_structure_has_field_typed (ps, "srtp-cipher", G_TYPE_STRING) && gst_structure_has_field_typed (ps, "srtp-auth", G_TYPE_STRING) && gst_structure_has_field_typed (ps, "srtcp-cipher", G_TYPE_STRING) &&