diff -wbrc gstreamer-1.2.0-orig/gst/gstiterator.c gstreamer-1.2.0/gst/gstiterator.c
*** gstreamer-1.2.0-orig/gst/gstiterator.c	2013-04-26 08:25:31.000000000 +0100
--- gstreamer-1.2.0/gst/gstiterator.c	2013-10-25 12:56:36.677890952 +0100
***************
*** 459,464 ****
--- 459,465 ----
    GstIterator iterator;
    GstIterator *slave;
  
+   GMutex * master_lock;
    GCompareFunc func;
    GValue user_data;
    gboolean have_user_data;
***************
*** 475,489 ****
      result = gst_iterator_next (it->slave, &item);
      switch (result) {
        case GST_ITERATOR_OK:
!         if (G_LIKELY (GST_ITERATOR (it)->lock))
!           g_mutex_unlock (GST_ITERATOR (it)->lock);
          if (it->func (&item, &it->user_data) == 0) {
            g_value_copy (&item, elem);
            done = TRUE;
          }
          g_value_reset (&item);
!         if (G_LIKELY (GST_ITERATOR (it)->lock))
!           g_mutex_lock (GST_ITERATOR (it)->lock);
          break;
        case GST_ITERATOR_RESYNC:
        case GST_ITERATOR_DONE:
--- 476,490 ----
      result = gst_iterator_next (it->slave, &item);
      switch (result) {
        case GST_ITERATOR_OK:
!         if (G_LIKELY (it->master_lock))
!           g_mutex_unlock (it->master_lock);
          if (it->func (&item, &it->user_data) == 0) {
            g_value_copy (&item, elem);
            done = TRUE;
          }
          g_value_reset (&item);
!         if (G_LIKELY (it->master_lock))
!           g_mutex_lock (it->master_lock);
          break;
        case GST_ITERATOR_RESYNC:
        case GST_ITERATOR_DONE:
***************
*** 559,564 ****
--- 560,566 ----
        (GstIteratorResyncFunction) filter_resync,
        (GstIteratorFreeFunction) filter_free);
  
+   result->master_lock = it->lock;
    it->lock = NULL;
    result->func = func;
    if (user_data) {
