mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
Use new _ref_sink when we can
This commit is contained in:
parent
54401df78c
commit
84c5db2635
3 changed files with 5 additions and 10 deletions
|
@ -231,8 +231,7 @@ gst_pad_template_init (GstPadTemplate * templ)
|
|||
* owned by the creator of the object
|
||||
*/
|
||||
if (GST_OBJECT_IS_FLOATING (templ)) {
|
||||
gst_object_ref (templ);
|
||||
gst_object_sink (templ);
|
||||
gst_object_ref_sink (templ);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,8 +241,7 @@ gst_registry_get_default (void)
|
|||
g_static_mutex_lock (&_gst_registry_mutex);
|
||||
if (G_UNLIKELY (!_gst_registry_default)) {
|
||||
_gst_registry_default = g_object_new (GST_TYPE_REGISTRY, NULL);
|
||||
gst_object_ref (GST_OBJECT_CAST (_gst_registry_default));
|
||||
gst_object_sink (GST_OBJECT_CAST (_gst_registry_default));
|
||||
gst_object_ref_sink (GST_OBJECT_CAST (_gst_registry_default));
|
||||
}
|
||||
registry = _gst_registry_default;
|
||||
g_static_mutex_unlock (&_gst_registry_mutex);
|
||||
|
@ -353,8 +352,7 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin)
|
|||
|
||||
registry->plugins = g_list_prepend (registry->plugins, plugin);
|
||||
|
||||
gst_object_ref (plugin);
|
||||
gst_object_sink (plugin);
|
||||
gst_object_ref_sink (plugin);
|
||||
GST_OBJECT_UNLOCK (registry);
|
||||
|
||||
GST_LOG_OBJECT (registry, "emitting plugin-added for filename \"%s\"",
|
||||
|
@ -461,8 +459,7 @@ gst_registry_add_feature (GstRegistry * registry, GstPluginFeature * feature)
|
|||
gst_object_unref (existing_feature);
|
||||
}
|
||||
|
||||
gst_object_ref (feature);
|
||||
gst_object_sink (feature);
|
||||
gst_object_ref_sink (feature);
|
||||
GST_OBJECT_UNLOCK (registry);
|
||||
|
||||
GST_LOG_OBJECT (registry, "emitting feature-added for %s", feature->name);
|
||||
|
|
|
@ -268,8 +268,7 @@ gst_system_clock_obtain (void)
|
|||
|
||||
/* we created the global clock; take ownership so
|
||||
* we can hand out instances later */
|
||||
gst_object_ref (clock);
|
||||
gst_object_sink (GST_OBJECT (clock));
|
||||
gst_object_ref_sink (clock);
|
||||
|
||||
_the_system_clock = clock;
|
||||
g_static_mutex_unlock (&_gst_sysclock_mutex);
|
||||
|
|
Loading…
Reference in a new issue