Add refcounting around _iterate to guard against unreffing in scheduling callbacks or other nastyties

Original commit message from CVS:
Add refcounting around _iterate to guard against unreffing in scheduling
callbacks or other nastyties
This commit is contained in:
Wim Taymans 2003-02-27 18:18:32 +00:00
parent 687448e204
commit ddd3265b11

View file

@ -979,6 +979,8 @@ gst_bin_iterate (GstBin *bin)
oclass = GST_BIN_GET_CLASS (bin);
gst_object_ref (GST_OBJECT (bin));
if (bin->pre_iterate_func)
(bin->pre_iterate_func) (bin, bin->pre_iterate_data);
@ -1000,6 +1002,7 @@ gst_bin_iterate (GstBin *bin)
running = TRUE;
}
}
gst_object_unref (GST_OBJECT (bin));
return running;
}