diff --git a/subprojects/gstreamer/gst/gstdeviceproviderfactory.c b/subprojects/gstreamer/gst/gstdeviceproviderfactory.c index 91e96efb37..13703bae01 100644 --- a/subprojects/gstreamer/gst/gstdeviceproviderfactory.c +++ b/subprojects/gstreamer/gst/gstdeviceproviderfactory.c @@ -270,7 +270,7 @@ gst_device_provider_factory_get (GstDeviceProviderFactory * factory) GST_INFO ("getting device provider \"%s\"", GST_OBJECT_NAME (factory)); - if (factory->type == 0) + if (factory->type == G_TYPE_INVALID) goto no_type; device_provider = g_atomic_pointer_get (&newfactory->provider); diff --git a/subprojects/gstreamer/gst/gstelementfactory.c b/subprojects/gstreamer/gst/gstelementfactory.c index 29d09e8eb6..b74a73b3a7 100644 --- a/subprojects/gstreamer/gst/gstelementfactory.c +++ b/subprojects/gstreamer/gst/gstelementfactory.c @@ -488,7 +488,7 @@ gst_element_factory_create_with_properties (GstElementFactory * factory, GST_INFO ("creating element \"%s\"", GST_OBJECT_NAME (factory)); - if (factory->type == 0) + if (factory->type == G_TYPE_INVALID) goto no_type; element = (GstElement *) g_object_new_with_properties (factory->type, n, @@ -574,7 +574,7 @@ gst_element_factory_create_valist (GstElementFactory * factory, (factory))); g_return_val_if_fail (newfactory != NULL, NULL); - g_return_val_if_fail (newfactory->type != 0, NULL); + g_return_val_if_fail (newfactory->type != G_TYPE_INVALID, NULL); factory = newfactory; diff --git a/subprojects/gstreamer/gst/gstmeta.c b/subprojects/gstreamer/gst/gstmeta.c index 60898770e7..9fc619860f 100644 --- a/subprojects/gstreamer/gst/gstmeta.c +++ b/subprojects/gstreamer/gst/gstmeta.c @@ -136,7 +136,7 @@ gst_meta_api_type_register (const gchar * api, const gchar ** tags) GST_CAT_DEBUG (GST_CAT_META, "register API \"%s\"", api); type = g_pointer_type_register_static (api); - if (type != 0) { + if (type != G_TYPE_INVALID) { gint i; for (i = 0; tags[i]; i++) { @@ -391,7 +391,7 @@ gst_meta_register (GType api, const gchar * impl, gsize size, * that this fails because it was already registered. Don't warn, * glib did this for us already. */ type = g_pointer_type_register_static (impl); - if (type == 0) + if (type == G_TYPE_INVALID) return NULL; info = (GstMetaInfo *) g_slice_new (GstMetaInfoImpl); diff --git a/subprojects/gstreamer/gst/gstregistry.c b/subprojects/gstreamer/gst/gstregistry.c index 3e8faed7bc..34f45291b1 100644 --- a/subprojects/gstreamer/gst/gstregistry.c +++ b/subprojects/gstreamer/gst/gstregistry.c @@ -703,8 +703,9 @@ gst_plugin_feature_type_name_filter (GstPluginFeature * feature, { g_assert (GST_IS_PLUGIN_FEATURE (feature)); - return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) && - (data->name == NULL || !strcmp (data->name, GST_OBJECT_NAME (feature)))); + return ((data->type == G_TYPE_INVALID + || data->type == G_OBJECT_TYPE (feature)) && (data->name == NULL + || !strcmp (data->name, GST_OBJECT_NAME (feature)))); } /* returns TRUE if the list was changed diff --git a/subprojects/gstreamer/gst/gsttaglist.c b/subprojects/gstreamer/gst/gsttaglist.c index 2b1b49aeb4..07519fe1d2 100644 --- a/subprojects/gstreamer/gst/gsttaglist.c +++ b/subprojects/gstreamer/gst/gsttaglist.c @@ -509,7 +509,7 @@ gst_tag_register (const gchar * name, GstTagFlag flag, GType type, g_return_if_fail (name != NULL); g_return_if_fail (nick != NULL); g_return_if_fail (blurb != NULL); - g_return_if_fail (type != 0 && type != GST_TYPE_LIST); + g_return_if_fail (type != G_TYPE_INVALID && type != GST_TYPE_LIST); gst_tag_register_static (g_intern_string (name), flag, type, g_intern_string (nick), g_intern_string (blurb), func); @@ -540,7 +540,7 @@ gst_tag_register_static (const gchar * name, GstTagFlag flag, GType type, g_return_if_fail (name != NULL); g_return_if_fail (nick != NULL); g_return_if_fail (blurb != NULL); - g_return_if_fail (type != 0 && type != GST_TYPE_LIST); + g_return_if_fail (type != G_TYPE_INVALID && type != GST_TYPE_LIST); info = gst_tag_lookup (name); diff --git a/subprojects/gstreamer/gst/gstvalue.c b/subprojects/gstreamer/gst/gstvalue.c index f475a4e403..11554ffef1 100644 --- a/subprojects/gstreamer/gst/gstvalue.c +++ b/subprojects/gstreamer/gst/gstvalue.c @@ -7792,12 +7792,12 @@ try_as_flags_string: if (end != NULL) { gchar *class_name = g_strndup (set_class, end - set_class); GType flags_type = g_type_from_name (class_name); - if (flags_type == 0) { + if (flags_type == G_TYPE_INVALID) { GST_TRACE ("Looking for dynamic type %s", class_name); gst_dynamic_type_factory_load (class_name); } - if (flags_type != 0) { + if (flags_type != G_TYPE_INVALID) { flags_klass = g_type_class_ref (flags_type); GST_TRACE ("Going to parse %s as %s", s, class_name); }