check/gst/gstbin.c: Make elements silent as the deep_notify refs the parent, which might make the test fail.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2005-07-16 13:50:37 +00:00
parent d34751b8c2
commit f89689b7e6
4 changed files with 28 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2005-07-16 Wim Taymans <wim@fluendo.com>
* 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 <tim at centricular dot net> 2005-07-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate): * gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):

View file

@ -205,9 +205,15 @@ GST_START_TEST (test_message_state_changed_children)
src = gst_element_factory_make ("fakesrc", NULL); src = gst_element_factory_make ("fakesrc", NULL);
fail_if (src == NULL, "Could not create fakesrc"); 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); gst_bin_add (GST_BIN (pipeline), src);
sink = gst_element_factory_make ("fakesink", NULL); 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"); fail_if (sink == NULL, "Could not create fakesink");
gst_bin_add (GST_BIN (pipeline), sink); gst_bin_add (GST_BIN (pipeline), sink);

View file

@ -515,14 +515,15 @@ gst_ghost_pad_do_activate_push (GstPad * pad, gboolean active)
ret = gst_proxy_pad_do_activatepush (pad, active); ret = gst_proxy_pad_do_activatepush (pad, active);
GST_LOCK (pad); GST_LOCK (pad);
if ((internal = GST_GHOST_PAD (pad)->internal))
internal = GST_GHOST_PAD (pad)->internal; gst_object_ref (internal);
if (internal)
ret &= gst_pad_activate_push (internal, active);
GST_UNLOCK (pad); GST_UNLOCK (pad);
if (internal) {
ret &= gst_pad_activate_push (internal, active);
gst_object_unref (internal);
}
return ret; return ret;
} }

View file

@ -205,9 +205,15 @@ GST_START_TEST (test_message_state_changed_children)
src = gst_element_factory_make ("fakesrc", NULL); src = gst_element_factory_make ("fakesrc", NULL);
fail_if (src == NULL, "Could not create fakesrc"); 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); gst_bin_add (GST_BIN (pipeline), src);
sink = gst_element_factory_make ("fakesink", NULL); 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"); fail_if (sink == NULL, "Could not create fakesink");
gst_bin_add (GST_BIN (pipeline), sink); gst_bin_add (GST_BIN (pipeline), sink);