mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
libs/gst/controller/gstcontroller.c: Free allocated GstTimedValues when freeing list nodes.
Original commit message from CVS: * libs/gst/controller/gstcontroller.c: (gst_controller_unset), (gst_controller_unset_all): Free allocated GstTimedValues when freeing list nodes. Should fix leaks 'make check-valgrind' complains about. * win32/common/libgstcontroller.def: Add gst_controller_unset_all.
This commit is contained in:
parent
e64da14164
commit
72845a47e6
3 changed files with 15 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2006-04-12 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* libs/gst/controller/gstcontroller.c: (gst_controller_unset),
|
||||||
|
(gst_controller_unset_all):
|
||||||
|
Free allocated GstTimedValues when freeing list nodes.
|
||||||
|
Should fix leaks 'make check-valgrind' complains about.
|
||||||
|
|
||||||
|
* win32/common/libgstcontroller.def:
|
||||||
|
Add gst_controller_unset_all.
|
||||||
|
|
||||||
2006-04-11 Stefan Kost <ensonic@users.sf.net>
|
2006-04-11 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/libs/gstreamer-libs-sections.txt:
|
* docs/libs/gstreamer-libs-sections.txt:
|
||||||
|
|
|
@ -792,6 +792,7 @@ gst_controller_unset (GstController * self, gchar * property_name,
|
||||||
/* check if a timed_value for the timestamp exists */
|
/* check if a timed_value for the timestamp exists */
|
||||||
if ((node = g_list_find_custom (prop->values, ×tamp,
|
if ((node = g_list_find_custom (prop->values, ×tamp,
|
||||||
gst_timed_value_find))) {
|
gst_timed_value_find))) {
|
||||||
|
g_free (node->data); /* free GstTimedValue */
|
||||||
prop->values = g_list_delete_link (prop->values, node);
|
prop->values = g_list_delete_link (prop->values, node);
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -823,6 +824,8 @@ gst_controller_unset_all (GstController * self, gchar * property_name)
|
||||||
|
|
||||||
g_mutex_lock (self->lock);
|
g_mutex_lock (self->lock);
|
||||||
if ((prop = gst_controller_find_controlled_property (self, property_name))) {
|
if ((prop = gst_controller_find_controlled_property (self, property_name))) {
|
||||||
|
/* free GstTimedValue structures */
|
||||||
|
g_list_foreach (prop->values, (GFunc) g_free, NULL);
|
||||||
g_list_free (prop->values);
|
g_list_free (prop->values);
|
||||||
prop->values = NULL;
|
prop->values = NULL;
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
|
|
|
@ -16,6 +16,7 @@ EXPORTS
|
||||||
gst_controller_set_interpolation_mode
|
gst_controller_set_interpolation_mode
|
||||||
gst_controller_sync_values
|
gst_controller_sync_values
|
||||||
gst_controller_unset
|
gst_controller_unset
|
||||||
|
gst_controller_unset_all
|
||||||
gst_object_control_properties
|
gst_object_control_properties
|
||||||
gst_object_get_controller
|
gst_object_get_controller
|
||||||
gst_object_get_value_array
|
gst_object_get_value_array
|
||||||
|
|
Loading…
Reference in a new issue