From 9b55d9b316d111cc1ca6f8129287963ee4dc8b55 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 21 Jul 2006 18:52:30 +0000 Subject: [PATCH] gst/gstparse.c: Also remove reentrance checks if flex is MT save (#348179) Original commit message from CVS: * gst/gstparse.c: (gst_parse_launch): Also remove reentrance checks if flex is MT save (#348179) Fix my empty ChangeLog entry below --- ChangeLog | 8 ++++++++ gst/gstparse.c | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3db3cd0855..9fb1d469e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-21 Stefan Kost + + * gst/gstparse.c: (gst_parse_launch): + Also remove reentrance checks if flex is MT save (#348179) + Fix my empty ChangeLog entry below + 2006-07-21 Andy Wingo * docs/libs/gstreamer-libs-sections.txt: Attempt to pacify buildbot. @@ -14,6 +20,8 @@ * configure.ac: * gst/gstparse.c: (gst_parse_launch): + Check for flex version and omit mutex if we have a MT save flex + (fixes #348179) 2006-07-21 Wim Taymans diff --git a/gst/gstparse.c b/gst/gstparse.c index 0c27d10c83..705e6806dd 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -36,10 +36,9 @@ #include "gstparse.h" #include "gstinfo.h" +#ifndef HAVE_MT_SAVE_FLEX /* the need for the mutex will go away with flex 2.5.6 */ static gboolean flex_busy = FALSE; - -#ifndef HAVE_MT_SAVE_FLEX static GStaticRecMutex flex_lock = G_STATIC_REC_MUTEX_INIT; #endif @@ -152,28 +151,28 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error) #ifndef HAVE_MT_SAVE_FLEX g_static_rec_mutex_lock (&flex_lock); -#endif if (flex_busy) goto recursive_call; flex_busy = TRUE; +#endif element = _gst_parse_launch (pipeline_description, error); - flex_busy = FALSE; #ifndef HAVE_MT_SAVE_FLEX + flex_busy = FALSE; g_static_rec_mutex_unlock (&flex_lock); #endif return element; /* ERRORS */ +#ifndef HAVE_MT_SAVE_FLEX recursive_call: { GST_WARNING ("calls to gst_parse_launch() cannot be nested"); -#ifndef HAVE_MT_SAVE_FLEX g_static_rec_mutex_unlock (&flex_lock); -#endif g_warning ("calls to gst_parse_launch() cannot be nested"); return NULL; } +#endif } -- 2.34.1