Use new _ref_sink when we can
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 2 May 2009 12:36:50 +0000 (14:36 +0200)
committerWim Taymans <wim@metal.(none)>
Mon, 11 May 2009 20:35:09 +0000 (22:35 +0200)
gst/gstpadtemplate.c
gst/gstregistry.c
gst/gstsystemclock.c

index 53c51bc..217b665 100644 (file)
@@ -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);
   }
 }
 
index fe5b447..2b67902 100644 (file)
@@ -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);
index 41398f7..9c6e16f 100644 (file)
@@ -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);