guint n_params;
GParameter *params;
GESAssetPrivate *priv = asset->priv;
+ GESExtractable *n_extractable;
params = ges_extractable_type_get_parameters_from_id (priv->extractable_type,
priv->id, &n_params);
- return g_object_newv (priv->extractable_type, n_params, params);
+ n_extractable = g_object_newv (priv->extractable_type, n_params, params);
+
+ while (n_params--)
+ g_value_unset (¶ms[n_params].value);
+ if (params)
+ g_free (params);
+
+ return n_extractable;
}
static gboolean
/* We already know that we have a valid ID here */
func_udata = g_strsplit (id, "!", -1);
- params[0].name = g_strdup ("fill-func");
+ params[0].name = "fill-func";
g_value_init (¶ms[0].value, G_TYPE_POINTER);
g_value_set_pointer (¶ms[0].value,
GUINT_TO_POINTER (g_ascii_strtoll (func_udata[0], NULL, 10)));
- params[1].name = g_strdup ("user-data");
+ params[1].name = "user-data";
g_value_init (¶ms[1].value, G_TYPE_POINTER);
g_value_set_pointer (¶ms[1].value,
GUINT_TO_POINTER (g_ascii_strtoll (func_udata[1], NULL, 10)));
- params[2].name = g_strdup ("supported-formats");
+ params[2].name = "supported-formats";
g_value_init (¶ms[2].value, G_TYPE_ENUM);
g_value_set_enum (¶ms[2].value, GES_TRACK_TYPE_CUSTOM);
{
GParameter *params = g_new0 (GParameter, 2);
- params[0].name = g_strdup ("uri");
+ params[0].name = "uri";
g_value_init (¶ms[0].value, G_TYPE_STRING);
g_value_set_string (¶ms[0].value, id);
GParameter *params = g_new0 (GParameter, 1);
GEnumValue *value = g_enum_get_value_by_nick (enum_class, id);
- params[0].name = g_strdup ("vtype");
+ params[0].name = "vtype";
g_value_init (¶ms[0].value, GES_VIDEO_STANDARD_TRANSITION_TYPE_TYPE);
g_value_set_enum (¶ms[0].value, value->value);
*n_params = 1;
{
GParameter *params = g_new0 (GParameter, 2);
- params[0].name = g_strdup ("bin-description");
+ params[0].name = "bin-description";
g_value_init (¶ms[0].value, G_TYPE_STRING);
g_value_set_string (¶ms[0].value, id);