From ddd3265b11604b34b0b08c6f9db3118348c9bdd0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 27 Feb 2003 18:18:32 +0000 Subject: [PATCH] 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 --- gst/gstbin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/gstbin.c b/gst/gstbin.c index 69e89fa..d269d8b 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -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; } -- 2.7.4