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
This commit is contained in:
Aleix Conchillo Flaqué 2016-04-14 22:32:05 -07:00 committed by Josep Torra
parent 8f853cfed5
commit 73ebdb888e

View file

@ -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) &&