diff -ur orig/gstreamer-0.10.5/gst/gstclock.c gstreamer-0.10.5/gst/gstclock.c
--- orig/gstreamer-0.10.5/gst/gstclock.c	2006-04-12 12:11:39.000000000 +0200
+++ gstreamer-0.10.5/gst/gstclock.c	2006-05-26 14:50:30.631871750 +0200
@@ -1217,8 +1217,8 @@
     case PROP_STATS:
       GST_OBJECT_LOCK (clock);
       clock->stats = g_value_get_boolean (value);
-      GST_OBJECT_UNLOCK (clock);
       g_object_notify (object, "stats");
+      GST_OBJECT_UNLOCK (clock);
       break;
     case PROP_WINDOW_SIZE:
       GST_CLOCK_SLAVE_LOCK (clock);
diff -ur orig/gstreamer-0.10.5/gst/gstghostpad.c gstreamer-0.10.5/gst/gstghostpad.c
--- orig/gstreamer-0.10.5/gst/gstghostpad.c	2006-04-12 12:11:40.000000000 +0200
+++ gstreamer-0.10.5/gst/gstghostpad.c	2006-05-26 14:50:30.631871750 +0200
@@ -680,9 +680,9 @@
 
   GST_OBJECT_LOCK (pad);
   gst_caps_replace (&(GST_PAD_CAPS (pad)), caps);
+  g_object_notify (G_OBJECT (pad), "caps");
   GST_OBJECT_UNLOCK (pad);
 
-  g_object_notify (G_OBJECT (pad), "caps");
   if (caps)
     gst_caps_unref (caps);
 }
diff -ur orig/gstreamer-0.10.5/gst/gstobject.c gstreamer-0.10.5/gst/gstobject.c
--- orig/gstreamer-0.10.5/gst/gstobject.c	2006-04-12 12:11:40.000000000 +0200
+++ gstreamer-0.10.5/gst/gstobject.c	2006-05-26 15:49:11.000000000 +0200
@@ -557,10 +557,9 @@
  * top-level bin to catch property-change notifications for all contained
  * elements.
  *
- * This function is not MT safe in glib < 2.8 so we need to lock it with a
- * classwide mutex in that case.
+ * Not MT safe. It is expected that the object is locked when calling
+ * g_object_notify().
  *
- * MT safe.
  */
 static void
 gst_object_dispatch_properties_changed (GObject * object,
@@ -587,11 +586,13 @@
   PATCH_REFCOUNT (object);
 
   gst_object = GST_OBJECT_CAST (object);
-  name = gst_object_get_name (gst_object);
+  name = g_strdup (gst_object->name);;
   debug_name = GST_STR_NULL (name);
 
   /* now let the parent dispatch those, too */
-  parent = gst_object_get_parent (gst_object);
+  parent = gst_object->parent;
+  if (parent)
+    gst_object_ref(parent);
   while (parent) {
     /* for debugging ... */
     gchar *parent_name = gst_object_get_name (parent);
diff -ur orig/gstreamer-0.10.5/gst/gstpad.c gstreamer-0.10.5/gst/gstpad.c
--- orig/gstreamer-0.10.5/gst/gstpad.c	2006-04-26 16:02:36.000000000 +0200
+++ gstreamer-0.10.5/gst/gstpad.c	2006-05-26 14:50:30.631871750 +0200
@@ -2234,10 +2234,11 @@
   gst_caps_replace (&GST_PAD_CAPS (pad), caps);
   GST_CAT_DEBUG (GST_CAT_CAPS, "%s:%s caps %" GST_PTR_FORMAT,
       GST_DEBUG_PAD_NAME (pad), caps);
-  GST_OBJECT_UNLOCK (pad);
 
   g_object_notify (G_OBJECT (pad), "caps");
 
+  GST_OBJECT_UNLOCK (pad);
+
   return TRUE;
 
 setting_same_caps:
diff -ur orig/gstreamer-0.10.5/plugins/elements/gstfakesink.c gstreamer-0.10.5/plugins/elements/gstfakesink.c
--- orig/gstreamer-0.10.5/plugins/elements/gstfakesink.c	2005-12-01 13:29:34.000000000 +0100
+++ gstreamer-0.10.5/plugins/elements/gstfakesink.c	2006-05-26 14:51:19.294913000 +0200
@@ -311,9 +311,8 @@
         g_strdup_printf ("event   ******* E (type: %d, %s) %p",
         GST_EVENT_TYPE (event), sstr, event);
     g_free (sstr);
-    GST_OBJECT_UNLOCK (sink);
-
     g_object_notify (G_OBJECT (sink), "last_message");
+    GST_OBJECT_UNLOCK (sink);
   }
 
   return TRUE;
@@ -329,9 +328,8 @@
     g_free (sink->last_message);
 
     sink->last_message = g_strdup_printf ("preroll   ******* ");
-    GST_OBJECT_UNLOCK (sink);
-
     g_object_notify (G_OBJECT (sink), "last_message");
+    GST_OBJECT_UNLOCK (sink);
   }
   return GST_FLOW_OK;
 }
@@ -367,9 +365,8 @@
         G_GINT64_FORMAT ", flags: %d) %p", GST_BUFFER_SIZE (buf), ts_str,
         dur_str, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf),
         GST_MINI_OBJECT (buf)->flags, buf);
-    GST_OBJECT_UNLOCK (sink);
-
     g_object_notify (G_OBJECT (sink), "last_message");
+    GST_OBJECT_UNLOCK (sink);
   }
   if (sink->signal_handoffs)
     g_signal_emit (G_OBJECT (sink), gst_fake_sink_signals[SIGNAL_HANDOFF], 0,
diff -ur orig/gstreamer-0.10.5/plugins/elements/gstfakesrc.c gstreamer-0.10.5/plugins/elements/gstfakesrc.c
--- orig/gstreamer-0.10.5/plugins/elements/gstfakesrc.c	2006-04-11 13:38:09.000000000 +0200
+++ gstreamer-0.10.5/plugins/elements/gstfakesrc.c	2006-05-26 14:50:51.053148000 +0200
@@ -409,9 +409,8 @@
         g_strdup_printf ("event   ******* E (type: %d, %s) %p",
         GST_EVENT_TYPE (event), sstr, event);
     g_free (sstr);
-    GST_OBJECT_UNLOCK (src);
-
     g_object_notify (G_OBJECT (src), "last_message");
+    GST_OBJECT_UNLOCK (src);
   }
 
 
@@ -810,9 +809,8 @@
         G_GINT64_FORMAT ", flags: %d) %p", GST_BUFFER_SIZE (buf), ts_str,
         dur_str, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf),
         GST_MINI_OBJECT (buf)->flags, buf);
-    GST_OBJECT_UNLOCK (src);
-
     g_object_notify (G_OBJECT (src), "last_message");
+    GST_OBJECT_UNLOCK (src);
   }
 
   if (src->signal_handoffs) {
diff -ur orig/gstreamer-0.10.5/plugins/elements/gstidentity.c gstreamer-0.10.5/plugins/elements/gstidentity.c
--- orig/gstreamer-0.10.5/plugins/elements/gstidentity.c	2006-04-11 13:38:09.000000000 +0200
+++ gstreamer-0.10.5/plugins/elements/gstidentity.c	2006-05-26 14:51:52.428983750 +0200
@@ -272,9 +272,8 @@
         GST_DEBUG_PAD_NAME (trans->sinkpad), GST_EVENT_TYPE (event), sstr,
         event);
     g_free (sstr);
-    GST_OBJECT_UNLOCK (identity);
-
     g_object_notify (G_OBJECT (identity), "last_message");
+    GST_OBJECT_UNLOCK (identity);
   }
 
   if (identity->single_segment
@@ -374,8 +373,8 @@
           GST_TIME_ARGS (GST_BUFFER_DURATION (buf)),
           GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf),
           GST_BUFFER_FLAGS (buf), buf);
-      GST_OBJECT_UNLOCK (identity);
       g_object_notify (G_OBJECT (identity), "last-message");
+      GST_OBJECT_UNLOCK (identity);
       return GST_FLOW_OK;
     }
   }
@@ -396,8 +395,8 @@
         GST_TIME_ARGS (GST_BUFFER_DURATION (buf)),
         GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf),
         GST_BUFFER_FLAGS (buf), buf);
-    GST_OBJECT_UNLOCK (identity);
     g_object_notify (G_OBJECT (identity), "last-message");
+    GST_OBJECT_UNLOCK (identity);
   }
 
   if (identity->datarate > 0) {
diff -ur orig/gstreamer-0.10.5/plugins/elements/gsttee.c gstreamer-0.10.5/plugins/elements/gsttee.c
--- orig/gstreamer-0.10.5/plugins/elements/gsttee.c	2006-04-11 13:38:09.000000000 +0200
+++ gstreamer-0.10.5/plugins/elements/gsttee.c	2006-05-26 14:50:56.717502000 +0200
@@ -276,8 +276,8 @@
         g_strdup_printf ("chain        ******* (%s:%s)t (%d bytes, %"
         G_GUINT64_FORMAT ") %p", GST_DEBUG_PAD_NAME (pad),
         GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
-    GST_OBJECT_UNLOCK (tee);
     g_object_notify (G_OBJECT (tee), "last_message");
+    GST_OBJECT_UNLOCK (tee);
   }
 
   /* Push */
