check/gst/gstbin.c: Make elements silent as the deep_notify refs the parent, which...
authorWim Taymans <wim.taymans@gmail.com>
Sat, 16 Jul 2005 13:50:37 +0000 (13:50 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 16 Jul 2005 13:50:37 +0000 (13:50 +0000)
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.

ChangeLog
check/gst/gstbin.c
gst/gstghostpad.c
tests/check/gst/gstbin.c

index eff957a..3eda9bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
index ccd3c84..0f11e5a 100644 (file)
@@ -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);
 
index 81a35cc..c7f7f00 100644 (file)
@@ -515,13 +515,14 @@ gst_ghost_pad_do_activate_push (GstPad * pad, gboolean active)
   ret = gst_proxy_pad_do_activatepush (pad, active);
 
   GST_LOCK (pad);
+  if ((internal = GST_GHOST_PAD (pad)->internal))
+    gst_object_ref (internal);
+  GST_UNLOCK (pad);
 
-  internal = GST_GHOST_PAD (pad)->internal;
-
-  if (internal)
+  if (internal) {
     ret &= gst_pad_activate_push (internal, active);
-
-  GST_UNLOCK (pad);
+    gst_object_unref (internal);
+  }
 
   return ret;
 }
index ccd3c84..0f11e5a 100644 (file)
@@ -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);