mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
formatter: Plug lists of TimedValue leak
This commit is contained in:
parent
2c9cbc6d06
commit
955d177dd6
3 changed files with 12 additions and 8 deletions
|
@ -1048,6 +1048,7 @@ ges_base_xml_formatter_add_control_binding (GESBaseXmlFormatter * self,
|
||||||
if (priv->state != STATE_LOADING_CLIPS) {
|
if (priv->state != STATE_LOADING_CLIPS) {
|
||||||
GST_DEBUG_OBJECT (self, "Not loading control bindings in %s state.",
|
GST_DEBUG_OBJECT (self, "Not loading control bindings in %s state.",
|
||||||
loading_state_name (priv->state));
|
loading_state_name (priv->state));
|
||||||
|
g_slist_free_full (timed_values, g_free);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1072,6 +1073,7 @@ ges_base_xml_formatter_add_control_binding (GESBaseXmlFormatter * self,
|
||||||
|
|
||||||
gst_timed_value_control_source_set_from_list (GST_TIMED_VALUE_CONTROL_SOURCE
|
gst_timed_value_control_source_set_from_list (GST_TIMED_VALUE_CONTROL_SOURCE
|
||||||
(source), timed_values);
|
(source), timed_values);
|
||||||
|
g_slist_free_full (timed_values, g_free);
|
||||||
} else
|
} else
|
||||||
GST_WARNING ("This interpolation type is not supported\n");
|
GST_WARNING ("This interpolation type is not supported\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -675,7 +675,7 @@ _parse_binding (GMarkupParseContext * context, const gchar * element_name,
|
||||||
if (strlen (pair)) {
|
if (strlen (pair)) {
|
||||||
GstTimedValue *value;
|
GstTimedValue *value;
|
||||||
|
|
||||||
value = g_slice_new (GstTimedValue);
|
value = g_new0 (GstTimedValue, 1);
|
||||||
value_pair = g_strsplit (pair, ":", 0);
|
value_pair = g_strsplit (pair, ":", 0);
|
||||||
value->timestamp = g_ascii_strtoull (value_pair[0], NULL, 10);
|
value->timestamp = g_ascii_strtoull (value_pair[0], NULL, 10);
|
||||||
value->value = g_ascii_strtod (value_pair[1], NULL);
|
value->value = g_ascii_strtod (value_pair[1], NULL);
|
||||||
|
@ -1425,6 +1425,7 @@ _save_keyframes (GString * str, GESTrackElement * trackelement, gint index,
|
||||||
":%s ", value->timestamp, g_ascii_dtostr (strbuf,
|
":%s ", value->timestamp, g_ascii_dtostr (strbuf,
|
||||||
G_ASCII_DTOSTR_BUF_SIZE, value->value)), depth);
|
G_ASCII_DTOSTR_BUF_SIZE, value->value)), depth);
|
||||||
}
|
}
|
||||||
|
g_list_free (timed_values);
|
||||||
append_escaped (str, g_markup_printf_escaped ("'/>\n"), depth);
|
append_escaped (str, g_markup_printf_escaped ("'/>\n"), depth);
|
||||||
} else
|
} else
|
||||||
GST_DEBUG ("control source not in [interpolation]");
|
GST_DEBUG ("control source not in [interpolation]");
|
||||||
|
|
|
@ -386,7 +386,7 @@ _check_properties (GESTimeline * timeline)
|
||||||
if (GES_IS_EFFECT (element)) {
|
if (GES_IS_EFFECT (element)) {
|
||||||
GstControlBinding *binding;
|
GstControlBinding *binding;
|
||||||
GstControlSource *source;
|
GstControlSource *source;
|
||||||
GList *timed_values;
|
GList *timed_values, *tmpvalue;
|
||||||
GstTimedValue *value;
|
GstTimedValue *value;
|
||||||
|
|
||||||
binding =
|
binding =
|
||||||
|
@ -397,20 +397,21 @@ _check_properties (GESTimeline * timeline)
|
||||||
fail_unless (source != NULL);
|
fail_unless (source != NULL);
|
||||||
|
|
||||||
/* Now check keyframe position */
|
/* Now check keyframe position */
|
||||||
timed_values =
|
tmpvalue = timed_values =
|
||||||
gst_timed_value_control_source_get_all
|
gst_timed_value_control_source_get_all
|
||||||
(GST_TIMED_VALUE_CONTROL_SOURCE (source));
|
(GST_TIMED_VALUE_CONTROL_SOURCE (source));
|
||||||
value = timed_values->data;
|
value = tmpvalue->data;
|
||||||
fail_unless (value->value == 0.);
|
fail_unless (value->value == 0.);
|
||||||
fail_unless (value->timestamp == 0 * GST_SECOND);
|
fail_unless (value->timestamp == 0 * GST_SECOND);
|
||||||
timed_values = timed_values->next;
|
tmpvalue = tmpvalue->next;
|
||||||
value = timed_values->data;
|
value = tmpvalue->data;
|
||||||
fail_unless (value->value == 0.);
|
fail_unless (value->value == 0.);
|
||||||
fail_unless (value->timestamp == 5 * GST_SECOND);
|
fail_unless (value->timestamp == 5 * GST_SECOND);
|
||||||
timed_values = timed_values->next;
|
tmpvalue = tmpvalue->next;
|
||||||
value = timed_values->data;
|
value = tmpvalue->data;
|
||||||
fail_unless (value->value == 1.);
|
fail_unless (value->value == 1.);
|
||||||
fail_unless (value->timestamp == 10 * GST_SECOND);
|
fail_unless (value->timestamp == 10 * GST_SECOND);
|
||||||
|
g_list_free (timed_values);
|
||||||
}
|
}
|
||||||
/* Checking children properties */
|
/* Checking children properties */
|
||||||
else if (GES_IS_VIDEO_SOURCE (element)) {
|
else if (GES_IS_VIDEO_SOURCE (element)) {
|
||||||
|
|
Loading…
Reference in a new issue