G_DEFINE_INTERFACE_WITH_CODE (GESMetaContainer, ges_meta_container,
G_TYPE_OBJECT, ges_meta_key =
- g_quark_from_static_string ("ges-meta-container-data"););
+ g_quark_from_static_string ("ges-meta-container-data");
+ );
enum
{
if (_can_write_value (container, meta_item, G_VALUE_TYPE (value)) == FALSE)
return FALSE;
- _set_value (container, meta_item, value);
-
- return TRUE;
+ return _set_value (container, meta_item, value);
}
/**
gst_structure_foreach (n_structure, (GstStructureForeachFunc) _append_foreach,
container);
+ gst_structure_free (n_structure);
return TRUE;
}
ges_meta_container_register_meta_ ## name (GESMetaContainer *container,\
GESMetaFlag flags, const gchar *meta_item, value_ctype value) \
{ \
+ gboolean ret; \
GValue gval = { 0 }; \
\
g_return_val_if_fail (GES_IS_META_CONTAINER (container), FALSE); \
g_return_val_if_fail (meta_item != NULL, FALSE); \
\
- if (!_register_meta (container, flags, meta_item, value_gtype)) \
+ if (!_register_meta (container, flags, meta_item, value_gtype)) \
return FALSE; \
\
g_value_init (&gval, value_gtype); \
g_value_set_ ##setter_name (&gval, value); \
\
- return _set_value (container, meta_item, &gval); \
+ ret = _set_value (container, meta_item, &gval); \
+ \
+ g_value_unset (&gval); \
+ return ret; \
}
/**