validate: scenario: Add a vmethod to free GstValidateActionParameter-s

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4265>
This commit is contained in:
Thibault Saunier 2023-03-24 15:00:43 -03:00 committed by GStreamer Marge Bot
parent da198e59b2
commit 00ed40dbfd
2 changed files with 16 additions and 1 deletions

View file

@ -607,6 +607,12 @@ struct _GstValidateActionTypePrivate
static void
_action_type_free (GstValidateActionType * type)
{
for (gint i = 0; type->parameters[i].name; i++) {
if (type->parameters[i].free) {
type->parameters[i].free (&type->parameters[i]);
}
}
g_free (type->parameters);
g_free (type->description);
g_free (type->name);

View file

@ -318,8 +318,17 @@ struct _GstValidateActionParameter
const gchar *possible_variables;
const gchar *def;
/**
* GstValidateActionParameter.free:
*
* Function that frees the various members of the structure when done using
*
* Since: 1.24
*/
GDestroyNotify free;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
gpointer _gst_reserved[GST_PADDING - 1];
};
struct _GstValidateScenarioClass