paramspecs: Use gst_value_array_get_type() for GstParamSpecArray type

When registering GstParamSpecArray, use the gst_value_array_get_type()
function to get the type, rather than the GST_TYPE_ARRAY macro, which
gets it from the _gst_value_array_type, which is in turn only
initialised during gst_init()

Fixes criticals with (python) bindings that look up all the
types from the gobject-introspection info as soon as they
are imported.

/usr/lib64/python3.5/site-packages/gi/module.py:178: Warning: g_param_type_register_static: assertion 'g_type_name (pspec_info->value_type) != NULL' failed
  g_type = info.get_g_type()
/usr/lib64/python3.5/site-packages/gi/module.py:212: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  type_ = g_type.pytype
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  g_type.pytype = wrapper
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_set_qdata: assertion 'node != NULL' failed
  g_type.pytype = wrapper
This commit is contained in:
Jan Schmidt 2017-03-24 17:53:31 +11:00
parent e571002dcb
commit 0ff74f8d6d

View file

@ -313,7 +313,7 @@ gst_param_spec_array_get_type (void)
_gst_param_array_validate, /* value_validate */
_gst_param_array_values_cmp, /* values_cmp */
};
pspec_info.value_type = GST_TYPE_ARRAY;
pspec_info.value_type = gst_value_array_get_type ();
type = g_param_type_register_static ("GstParamArray", &pspec_info);
}
return type;