mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
srtp: Fix filter handling in caps negotiation to keep filter content
This commit is contained in:
parent
23b2b46993
commit
ed7f675966
2 changed files with 12 additions and 1 deletions
|
@ -731,6 +731,14 @@ gst_srtp_dec_sink_query (GstPad * pad, GstObject * parent, GstQuery * query,
|
|||
gst_structure_set_name (ps, "application/x-srtp");
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
GstCaps *tmp;
|
||||
|
||||
tmp = gst_caps_intersect (ret, filter);
|
||||
gst_caps_unref (ret);
|
||||
ret = tmp;
|
||||
}
|
||||
|
||||
gst_query_set_caps_result (query, ret);
|
||||
return TRUE;
|
||||
|
||||
|
@ -815,6 +823,7 @@ gst_srtp_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
|
|||
|
||||
if (!(stream = validate_buffer (filter, buf, &ssrc, is_rtcp))) {
|
||||
GST_OBJECT_UNLOCK (filter);
|
||||
GST_WARNING_OBJECT (filter, "Invalid buffer, dropping");
|
||||
goto drop_buffer;
|
||||
}
|
||||
|
||||
|
@ -879,6 +888,7 @@ unprotect:
|
|||
goto drop_buffer;
|
||||
|
||||
default:
|
||||
GST_WARNING_OBJECT (filter, "Other error");
|
||||
goto drop_buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,7 +263,8 @@ gst_srtp_enc_class_init (GstSrtpEncClass * klass)
|
|||
|
||||
/* Install properties */
|
||||
g_object_class_install_property (gobject_class, PROP_MKEY,
|
||||
g_param_spec_boxed ("key", "Key", "Master key",
|
||||
g_param_spec_boxed ("key", "Key", "Master key (of "
|
||||
G_STRINGIFY (SRTP_MASTER_KEY_LEN) " bytes)",
|
||||
GST_TYPE_BUFFER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
GST_PARAM_MUTABLE_PLAYING));
|
||||
g_object_class_install_property (gobject_class, PROP_RTP_CIPHER,
|
||||
|
|
Loading…
Reference in a new issue