diff --git a/gst/gstcaps.c b/gst/gstcaps.c index c2ca2bc079..9c0c0e81af 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -940,11 +940,11 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs) g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); type = GST_TYPE_DATE; } -#ifndef G_VALUE_COLLECT_INIT +#if GLIB_CHECK_VERSION(2,23,3) + G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err); +#else g_value_init (&value, type); G_VALUE_COLLECT (&value, varargs, 0, &err); -#else - G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err); #endif if (G_UNLIKELY (err)) { g_critical ("%s", err); diff --git a/gst/gstchildproxy.c b/gst/gstchildproxy.c index faa0f07271..13aa71b809 100644 --- a/gst/gstchildproxy.c +++ b/gst/gstchildproxy.c @@ -388,12 +388,12 @@ gst_child_proxy_set_valist (GstObject * object, if (!gst_child_proxy_lookup (object, name, &target, &pspec)) goto not_found; -#ifndef G_VALUE_COLLECT_INIT - g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); - G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error); -#else +#if GLIB_CHECK_VERSION(2,23,3) G_VALUE_COLLECT_INIT (&value, pspec->value_type, var_args, G_VALUE_NOCOPY_CONTENTS, &error); +#else + g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); + G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error); #endif if (error) goto cant_copy; diff --git a/gst/gststructure.c b/gst/gststructure.c index a82accbf2b..e0304464ac 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -517,11 +517,11 @@ gst_structure_set_valist (GstStructure * structure, g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); type = GST_TYPE_DATE; } -#ifndef G_VALUE_COLLECT_INIT +#if GLIB_CHECK_VERSION(2,23,3) + G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err); +#else g_value_init (&field.value, type); G_VALUE_COLLECT (&field.value, varargs, 0, &err); -#else - G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err); #endif if (G_UNLIKELY (err)) { g_critical ("%s", err); diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 8afbc6f2fb..5fb9d8c77e 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -957,11 +957,11 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode, g_warning ("unknown tag '%s'", tag); return; } -#ifndef G_VALUE_COLLECT_INIT +#if GLIB_CHECK_VERSION(2,23,3) + G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error); +#else g_value_init (&value, info->type); G_VALUE_COLLECT (&value, var_args, 0, &error); -#else - G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error); #endif if (error) { g_warning ("%s: %s", G_STRLOC, error);