mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
gst: Use gst_object_{ref|unref} where applicable
Allows us to debug object life
This commit is contained in:
parent
82c92a9c7c
commit
bce79fcdc0
2 changed files with 5 additions and 5 deletions
|
@ -340,7 +340,7 @@ gst_object_replace (GstObject ** oldobj, GstObject * newobj)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (newobj)
|
if (newobj)
|
||||||
g_object_ref (newobj);
|
gst_object_ref (newobj);
|
||||||
|
|
||||||
while (G_UNLIKELY (!g_atomic_pointer_compare_and_exchange ((gpointer *)
|
while (G_UNLIKELY (!g_atomic_pointer_compare_and_exchange ((gpointer *)
|
||||||
oldobj, oldptr, newobj))) {
|
oldobj, oldptr, newobj))) {
|
||||||
|
@ -350,7 +350,7 @@ gst_object_replace (GstObject ** oldobj, GstObject * newobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldptr)
|
if (oldptr)
|
||||||
g_object_unref (oldptr);
|
gst_object_unref (oldptr);
|
||||||
|
|
||||||
return oldptr != newobj;
|
return oldptr != newobj;
|
||||||
}
|
}
|
||||||
|
@ -1220,7 +1220,7 @@ gst_object_get_control_binding (GstObject * object, const gchar * property_name)
|
||||||
|
|
||||||
GST_OBJECT_LOCK (object);
|
GST_OBJECT_LOCK (object);
|
||||||
if ((binding = gst_object_find_control_binding (object, property_name))) {
|
if ((binding = gst_object_find_control_binding (object, property_name))) {
|
||||||
g_object_ref (binding);
|
gst_object_ref (binding);
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (object);
|
GST_OBJECT_UNLOCK (object);
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ gst_plugin_feature_list_copy (GList * list)
|
||||||
GList *last;
|
GList *last;
|
||||||
|
|
||||||
new_list = g_list_alloc ();
|
new_list = g_list_alloc ();
|
||||||
new_list->data = g_object_ref ((GObject *) list->data);
|
new_list->data = gst_object_ref (list->data);
|
||||||
new_list->prev = NULL;
|
new_list->prev = NULL;
|
||||||
last = new_list;
|
last = new_list;
|
||||||
list = list->next;
|
list = list->next;
|
||||||
|
@ -229,7 +229,7 @@ gst_plugin_feature_list_copy (GList * list)
|
||||||
last->next = g_list_alloc ();
|
last->next = g_list_alloc ();
|
||||||
last->next->prev = last;
|
last->next->prev = last;
|
||||||
last = last->next;
|
last = last->next;
|
||||||
last->data = g_object_ref ((GObject *) list->data);
|
last->data = gst_object_ref (list->data);
|
||||||
list = list->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
last->next = NULL;
|
last->next = NULL;
|
||||||
|
|
Loading…
Reference in a new issue