mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
permissions: Also copy the roles
This commit is contained in:
parent
91a32754e3
commit
db74d5c559
1 changed files with 11 additions and 2 deletions
|
@ -77,9 +77,18 @@ static GstRTSPPermissions *
|
|||
_gst_rtsp_permissions_copy (GstRTSPPermissionsImpl * permissions)
|
||||
{
|
||||
GstRTSPPermissionsImpl *copy;
|
||||
guint i;
|
||||
|
||||
copy = g_slice_new0 (GstRTSPPermissionsImpl);
|
||||
gst_rtsp_permissions_init (copy);
|
||||
copy = (GstRTSPPermissionsImpl *) gst_rtsp_permissions_new ();
|
||||
|
||||
for (i = 0; i < permissions->roles->len; i++) {
|
||||
GstStructure *entry = g_ptr_array_index (permissions->roles, i);
|
||||
GstStructure *entry_copy = gst_structure_copy (entry);
|
||||
|
||||
gst_structure_set_parent_refcount (entry_copy,
|
||||
©->permissions.mini_object.refcount);
|
||||
g_ptr_array_add (permissions->roles, entry_copy);
|
||||
}
|
||||
|
||||
return GST_RTSP_PERMISSIONS (copy);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue