mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gstbin: Use g_queue_clear_full()
Use g_queue_clear_full() to release the child list instead of iterating over the list twice. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3101>
This commit is contained in:
parent
8f91f1efe4
commit
92efecd1fe
1 changed files with 1 additions and 2 deletions
|
@ -1123,8 +1123,7 @@ gst_bin_do_deep_add_remove (GstBin * bin, gint sig_id, const gchar * sig_name,
|
|||
do {
|
||||
ires = gst_iterator_foreach (it, bin_deep_iterator_foreach, &elements);
|
||||
if (ires != GST_ITERATOR_DONE) {
|
||||
g_queue_foreach (&elements, (GFunc) gst_object_unref, NULL);
|
||||
g_queue_clear (&elements);
|
||||
g_queue_clear_full (&elements, (GDestroyNotify) gst_object_unref);
|
||||
}
|
||||
if (ires == GST_ITERATOR_RESYNC)
|
||||
gst_iterator_resync (it);
|
||||
|
|
Loading…
Reference in a new issue