/* compare the basic types - they have to match */
first = VALUE_LIST_GET_VALUE (list, 0);
#define CHECK_TYPES(type,prefix) \
- (prefix##_VALUE_HOLDS_##type(first) && GST_VALUE_HOLDS_##type##_RANGE (value))
+ ((first) && G_VALUE_TYPE(first) == prefix##_TYPE_##type && GST_VALUE_HOLDS_##type##_RANGE (value))
if (CHECK_TYPES (INT, G)) {
const gint rmin = gst_value_get_int_range_min (value);
const gint rmax = gst_value_get_int_range_max (value);
*
* Checks if the given #GValue contains a #GST_TYPE_STRUCTURE value.
*/
-#define GST_VALUE_HOLDS_STRUCTURE(x) (G_VALUE_HOLDS((x), _gst_structure_type))
+#define GST_VALUE_HOLDS_STRUCTURE(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_structure_type)
/**
* GST_VALUE_HOLDS_CAPS_FEATURES:
*
* Checks if the given #GValue contains a #GST_TYPE_CAPS_FEATURES value.
*/
-#define GST_VALUE_HOLDS_CAPS_FEATURES(x) (G_VALUE_HOLDS((x), _gst_caps_features_type))
+#define GST_VALUE_HOLDS_CAPS_FEATURES(x) ((x) != NULL && G_VALUE_TYPE(x) == _gst_caps_features_type)
/**
* GST_VALUE_HOLDS_BUFFER:
*
* Since: 1.6
*/
-#define GST_VALUE_HOLDS_FLAG_SET(x) (G_TYPE_CHECK_VALUE_TYPE ((x), GST_TYPE_FLAG_SET))
+#define GST_VALUE_HOLDS_FLAG_SET(x) (G_TYPE_FUNDAMENTAL (G_VALUE_TYPE ((x))) == GST_TYPE_FLAG_SET)
/**
* GST_FLAG_SET_MASK_EXACT: (value 4294967295) (type guint)