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
This commit is contained in:
Stefan Kost 2006-07-21 18:52:30 +00:00
parent 912671152f
commit 9b55d9b316
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2006-07-21 Stefan Kost <ensonic@users.sf.net>
* 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 <wingo@pobox.com> 2006-07-21 Andy Wingo <wingo@pobox.com>
* docs/libs/gstreamer-libs-sections.txt: Attempt to pacify buildbot. * docs/libs/gstreamer-libs-sections.txt: Attempt to pacify buildbot.
@ -14,6 +20,8 @@
* configure.ac: * configure.ac:
* gst/gstparse.c: (gst_parse_launch): * 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 <wim@fluendo.com> 2006-07-21 Wim Taymans <wim@fluendo.com>

View file

@ -36,10 +36,9 @@
#include "gstparse.h" #include "gstparse.h"
#include "gstinfo.h" #include "gstinfo.h"
#ifndef HAVE_MT_SAVE_FLEX
/* the need for the mutex will go away with flex 2.5.6 */ /* the need for the mutex will go away with flex 2.5.6 */
static gboolean flex_busy = FALSE; static gboolean flex_busy = FALSE;
#ifndef HAVE_MT_SAVE_FLEX
static GStaticRecMutex flex_lock = G_STATIC_REC_MUTEX_INIT; static GStaticRecMutex flex_lock = G_STATIC_REC_MUTEX_INIT;
#endif #endif
@ -152,28 +151,28 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error)
#ifndef HAVE_MT_SAVE_FLEX #ifndef HAVE_MT_SAVE_FLEX
g_static_rec_mutex_lock (&flex_lock); g_static_rec_mutex_lock (&flex_lock);
#endif
if (flex_busy) if (flex_busy)
goto recursive_call; goto recursive_call;
flex_busy = TRUE; flex_busy = TRUE;
#endif
element = _gst_parse_launch (pipeline_description, error); element = _gst_parse_launch (pipeline_description, error);
flex_busy = FALSE;
#ifndef HAVE_MT_SAVE_FLEX #ifndef HAVE_MT_SAVE_FLEX
flex_busy = FALSE;
g_static_rec_mutex_unlock (&flex_lock); g_static_rec_mutex_unlock (&flex_lock);
#endif #endif
return element; return element;
/* ERRORS */ /* ERRORS */
#ifndef HAVE_MT_SAVE_FLEX
recursive_call: recursive_call:
{ {
GST_WARNING ("calls to gst_parse_launch() cannot be nested"); GST_WARNING ("calls to gst_parse_launch() cannot be nested");
#ifndef HAVE_MT_SAVE_FLEX
g_static_rec_mutex_unlock (&flex_lock); g_static_rec_mutex_unlock (&flex_lock);
#endif
g_warning ("calls to gst_parse_launch() cannot be nested"); g_warning ("calls to gst_parse_launch() cannot be nested");
return NULL; return NULL;
} }
#endif
} }