mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
testsrcbin: fix memory leak
CID 1434971
This commit is contained in:
parent
cbb4bdbb94
commit
9b597200f4
1 changed files with 4 additions and 1 deletions
|
@ -254,7 +254,7 @@ gst_test_src_bin_uri_handler_set_uri (GstURIHandler * handler,
|
|||
gchar *tmp, *location = gst_uri_get_location (uri);
|
||||
gint i, n_audio = 0, n_video = 0;
|
||||
GstStreamCollection *collection = gst_stream_collection_new (NULL);
|
||||
GstIterator *it = gst_bin_iterate_elements (GST_BIN (self));
|
||||
GstIterator *it;
|
||||
GstCaps *streams_defs;
|
||||
|
||||
for (tmp = location; *tmp != '\0'; tmp++)
|
||||
|
@ -268,11 +268,14 @@ gst_test_src_bin_uri_handler_set_uri (GstURIHandler * handler,
|
|||
goto failed;
|
||||
|
||||
/* Clear us up */
|
||||
it = gst_bin_iterate_elements (GST_BIN (self));
|
||||
while (gst_iterator_foreach (it,
|
||||
(GstIteratorForeachFunction) gst_test_src_bin_remove_child,
|
||||
self) == GST_ITERATOR_RESYNC)
|
||||
gst_iterator_resync (it);
|
||||
|
||||
gst_iterator_free (it);
|
||||
|
||||
self->group_id = gst_util_group_id_next ();
|
||||
for (i = 0; i < gst_caps_get_size (streams_defs); i++) {
|
||||
GstStructure *stream_def = gst_caps_get_structure (streams_defs, i);
|
||||
|
|
Loading…
Reference in a new issue