+2006-07-20 Stefan Kost <ensonic@users.sf.net>
+
+ * gst/gstparse.c: (gst_parse_launch):
+ Do not hange on recursive uasge of gst_parse_launch()
+
2006-07-20 Tim-Philipp Müller <tim at centricular dot net>
* gst/gsttaglist.c:
GstElement *
gst_parse_launch (const gchar * pipeline_description, GError ** error)
{
- GstElement *element;
+ GstElement *element = NULL;
static GStaticMutex flex_lock = G_STATIC_MUTEX_INIT;
g_return_val_if_fail (pipeline_description != NULL, NULL);
pipeline_description);
/* the need for the mutex will go away with flex 2.5.6 */
- g_static_mutex_lock (&flex_lock);
- element = _gst_parse_launch (pipeline_description, error);
- g_static_mutex_unlock (&flex_lock);
+ if (g_static_mutex_trylock (&flex_lock)) {
+ element = _gst_parse_launch (pipeline_description, error);
+ g_static_mutex_unlock (&flex_lock);
+ } else {
+ GST_WARNING ("gst_parse_launch() cannot be nested");
+ }
return element;
}