mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
fix gst_debug_remove_with_compare_func and make testsuite/debug run again
Original commit message from CVS: fix gst_debug_remove_with_compare_func and make testsuite/debug run again
This commit is contained in:
parent
4b1d031c6b
commit
4f1525c8bd
1 changed files with 6 additions and 5 deletions
|
@ -480,13 +480,14 @@ gst_debug_remove_with_compare_func (GCompareFunc func, gpointer data)
|
||||||
guint removals = 0;
|
guint removals = 0;
|
||||||
g_static_mutex_lock (&__log_func_mutex);
|
g_static_mutex_lock (&__log_func_mutex);
|
||||||
new = __log_functions;
|
new = __log_functions;
|
||||||
while ((found = g_slist_find_custom (new, func,
|
while ((found = g_slist_find_custom (new, data, func))) {
|
||||||
gst_debug_compare_log_function_by_func))) {
|
if (new == __log_functions) {
|
||||||
g_free (found->data);
|
|
||||||
if (removals == 0) {
|
|
||||||
new = g_slist_copy (new);
|
new = g_slist_copy (new);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
new = g_slist_delete_link (new, found);
|
g_free (found->data);
|
||||||
|
new = g_slist_remove_link (new, found);
|
||||||
|
g_slist_free_1 (found);
|
||||||
removals++;
|
removals++;
|
||||||
}
|
}
|
||||||
/* FIXME: We leak the old list here. See _add_log_function for why. */
|
/* FIXME: We leak the old list here. See _add_log_function for why. */
|
||||||
|
|
Loading…
Reference in a new issue