array/fraction: In param types, use get_type() function directly
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 22 Mar 2017 17:35:32 +0000 (13:35 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 24 Mar 2017 17:30:45 +0000 (13:30 -0400)
The GST_TYPE macro points to global variables initialized by the
first call to get_type. This is not an issue if you call gst_init()
but unfortunatly pygi will need to acces the param type before
init can be called. This removes an assertion.

gst/gstparamspecs.c

index 8882062..66de3bd 100644 (file)
@@ -138,7 +138,7 @@ gst_param_spec_fraction_get_type (void)
       _gst_param_fraction_validate,     /* value_validate    */
       _gst_param_fraction_values_cmp,   /* values_cmp        */
     };
-    pspec_info.value_type = GST_TYPE_FRACTION;
+    pspec_info.value_type = gst_fraction_get_type ();
     type = g_param_type_register_static ("GstParamFraction", &pspec_info);
     g_once_init_leave (&gst_faction_type, type);
   }