mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-27 14:31:01 +00:00
Original commit message from CVS:
* configure.ac: * gst/gstparse.c: (gst_parse_launch):
This commit is contained in:
parent
c345ebb06a
commit
4cb08fa3f2
4 changed files with 20 additions and 31 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-07-21 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* configure.ac:
|
||||
* gst/gstparse.c: (gst_parse_launch):
|
||||
|
||||
2006-07-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstparse.c: (gst_parse_launch):
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 53ecdc0c97a2992e5abeddd41d514bc142401e5d
|
||||
Subproject commit c22b0a7fbd8ebcf0a531f2898163d9b834f89ab1
|
35
configure.ac
35
configure.ac
|
@ -236,41 +236,16 @@ AC_PROG_CC
|
|||
dnl find an assembler
|
||||
AM_PROG_AS
|
||||
|
||||
dnl we use awk in the bison version check
|
||||
AC_PROG_AWK
|
||||
|
||||
dnl we require bison for building the parser
|
||||
dnl FIXME: check if AC_PROG_YACC is suitable here
|
||||
dnl FIXME: make precious
|
||||
AC_PATH_PROG(BISON_PATH, bison, no)
|
||||
if test x$BISON_PATH = xno; then
|
||||
AC_MSG_ERROR(Could not find bison)
|
||||
fi
|
||||
|
||||
dnl check bison version
|
||||
AC_MSG_CHECKING([bison version])
|
||||
|
||||
if $BISON_PATH --version | head -n 1 | $AWK '{ if ($4 < 1.35) exit 1; else exit 0;}';
|
||||
then
|
||||
AC_MSG_RESULT([ok])
|
||||
else
|
||||
AC_MSG_RESULT([too old.])
|
||||
AC_MSG_ERROR([Your bison version is too old, v1.35 or later is required.])
|
||||
fi
|
||||
|
||||
dnl we require flex for building the parser
|
||||
dnl FIXME: check if AC_PROG_LEX is suitable here
|
||||
AC_PATH_PROG(FLEX_PATH, flex, no)
|
||||
if test x$FLEX_PATH = xno; then
|
||||
AC_MSG_ERROR(Could not find flex)
|
||||
fi
|
||||
|
||||
dnl Perl is used in building documentation
|
||||
dnl Perl is used in building documentation and in the version checks
|
||||
AC_PATH_PROG(PERL_PATH, perl, no)
|
||||
if test x$PERL_PATH = xno; then
|
||||
AC_MSG_ERROR(Could not find perl)
|
||||
fi
|
||||
|
||||
dnl we require flex and bison for building the parser
|
||||
GST_BISON_CHECK
|
||||
GST_FLEX_CHECK
|
||||
|
||||
AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
|
||||
AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
|
||||
|
||||
|
|
|
@ -38,7 +38,10 @@
|
|||
|
||||
/* 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
|
||||
|
||||
extern GstElement *_gst_parse_launch (const gchar *, GError **);
|
||||
|
||||
|
@ -147,7 +150,9 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error)
|
|||
GST_CAT_INFO (GST_CAT_PIPELINE, "parsing pipeline description %s",
|
||||
pipeline_description);
|
||||
|
||||
#ifndef HAVE_MT_SAVE_FLEX
|
||||
g_static_rec_mutex_lock (&flex_lock);
|
||||
#endif
|
||||
if (flex_busy)
|
||||
goto recursive_call;
|
||||
flex_busy = TRUE;
|
||||
|
@ -155,7 +160,9 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error)
|
|||
element = _gst_parse_launch (pipeline_description, error);
|
||||
|
||||
flex_busy = FALSE;
|
||||
#ifndef HAVE_MT_SAVE_FLEX
|
||||
g_static_rec_mutex_unlock (&flex_lock);
|
||||
#endif
|
||||
|
||||
return element;
|
||||
|
||||
|
@ -163,7 +170,9 @@ gst_parse_launch (const gchar * pipeline_description, GError ** error)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue