diff --git a/ChangeLog b/ChangeLog index eff957acf3..3eda9bc604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-07-16 Wim Taymans + + * check/gst/gstbin.c: (GST_START_TEST): + Make elements silent as the deep_notify refs the + parent, which might make the test fail. + + * gst/gstghostpad.c: (gst_ghost_pad_do_activate_push): + Don't hold the lock for too long. + 2005-07-16 Tim-Philipp Müller * gst/base/gstbasesrc.c: (gst_base_src_default_negotiate): diff --git a/check/gst/gstbin.c b/check/gst/gstbin.c index ccd3c842de..0f11e5a01d 100644 --- a/check/gst/gstbin.c +++ b/check/gst/gstbin.c @@ -205,9 +205,15 @@ GST_START_TEST (test_message_state_changed_children) src = gst_element_factory_make ("fakesrc", NULL); fail_if (src == NULL, "Could not create fakesrc"); + /* need to silence the element as the deep_notify refcounts the + * parents while running */ + g_object_set (G_OBJECT (src), "silent", TRUE, NULL); gst_bin_add (GST_BIN (pipeline), src); sink = gst_element_factory_make ("fakesink", NULL); + /* need to silence the element as the deep_notify refcounts the + * parents while running */ + g_object_set (G_OBJECT (sink), "silent", TRUE, NULL); fail_if (sink == NULL, "Could not create fakesink"); gst_bin_add (GST_BIN (pipeline), sink); diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index 81a35cc122..c7f7f009d3 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -515,14 +515,15 @@ gst_ghost_pad_do_activate_push (GstPad * pad, gboolean active) ret = gst_proxy_pad_do_activatepush (pad, active); GST_LOCK (pad); - - internal = GST_GHOST_PAD (pad)->internal; - - if (internal) - ret &= gst_pad_activate_push (internal, active); - + if ((internal = GST_GHOST_PAD (pad)->internal)) + gst_object_ref (internal); GST_UNLOCK (pad); + if (internal) { + ret &= gst_pad_activate_push (internal, active); + gst_object_unref (internal); + } + return ret; } diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c index ccd3c842de..0f11e5a01d 100644 --- a/tests/check/gst/gstbin.c +++ b/tests/check/gst/gstbin.c @@ -205,9 +205,15 @@ GST_START_TEST (test_message_state_changed_children) src = gst_element_factory_make ("fakesrc", NULL); fail_if (src == NULL, "Could not create fakesrc"); + /* need to silence the element as the deep_notify refcounts the + * parents while running */ + g_object_set (G_OBJECT (src), "silent", TRUE, NULL); gst_bin_add (GST_BIN (pipeline), src); sink = gst_element_factory_make ("fakesink", NULL); + /* need to silence the element as the deep_notify refcounts the + * parents while running */ + g_object_set (G_OBJECT (sink), "silent", TRUE, NULL); fail_if (sink == NULL, "Could not create fakesink"); gst_bin_add (GST_BIN (pipeline), sink);