+2005-11-11 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstpad.c: (gst_pad_get_caps), (gst_pad_peer_get_caps):
+ While checking the flag for reentrancy in the gstcaps function
+ is nice to detect recursive invocations, it also makes it
+ impossible to call getcaps from multiple threads, which must be
+ possible. So, checking for recursive calls has to go.
+
2005-11-11 Michael Smith <msmith@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
GST_CAT_DEBUG (GST_CAT_CAPS, "get pad caps of %s:%s (%p)",
GST_DEBUG_PAD_NAME (pad), pad);
- if (G_UNLIKELY (GST_PAD_IS_IN_GETCAPS (pad)))
- goto was_dispatching;
-
result = gst_pad_get_caps_unlocked (pad);
GST_UNLOCK (pad);
return result;
-
-was_dispatching:
- {
- GST_CAT_DEBUG (GST_CAT_CAPS,
- "pad %s:%s is already dispatching!", GST_DEBUG_PAD_NAME (pad));
- g_warning ("pad %s:%s recursively called getcaps!",
- GST_DEBUG_PAD_NAME (pad));
- GST_UNLOCK (pad);
- return NULL;
- }
}
/**
*
* Returns: the #GstCaps of the peer pad. This function returns a new caps, so use
* gst_caps_unref to get rid of it. this function returns NULL if there is no
- * peer pad or when this function is called recursively from a getcaps function.
+ * peer pad.
*/
GstCaps *
gst_pad_peer_get_caps (GstPad * pad)
if (G_UNLIKELY (peerpad == NULL))
goto no_peer;
- if (G_UNLIKELY (GST_PAD_IS_IN_GETCAPS (peerpad)))
- goto was_dispatching;
-
gst_object_ref (peerpad);
GST_UNLOCK (pad);
GST_UNLOCK (pad);
return NULL;
}
-was_dispatching:
- {
- GST_CAT_DEBUG (GST_CAT_CAPS,
- "pad %s:%s is already dispatching!", GST_DEBUG_PAD_NAME (pad));
- g_warning ("pad %s:%s recursively called getcaps!",
- GST_DEBUG_PAD_NAME (pad));
- GST_UNLOCK (pad);
- return NULL;
- }
}
static gboolean