From afc9c06eb596169d15a45c01db33e218adfe04e1 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 3 Aug 2004 12:40:47 +0000 Subject: [PATCH] gst/gst.c: fix for G_DISABLE_ASSERT Original commit message from CVS: * gst/gst.c: (gst_register_core_elements): fix for G_DISABLE_ASSERT * gst/gstinfo.c: (__gst_in_valgrind): add for GST_DISABLE_DEBUG --- ChangeLog | 7 +++++++ gst/gst.c | 16 ++++++++-------- gst/gstinfo.c | 9 +++++++++ 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fd31d3..9ad7781 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-08-03 Benjamin Otte + * gst/gst.c: (gst_register_core_elements): + fix for G_DISABLE_ASSERT + * gst/gstinfo.c: (__gst_in_valgrind): + add for GST_DISABLE_DEBUG + +2004-08-03 Benjamin Otte + * gst/parse/parse.l: fix for G_DISABLE_ASSERT diff --git a/gst/gst.c b/gst/gst.c index 16e99ae..d1f9e8a 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -520,14 +520,14 @@ static gboolean gst_register_core_elements (GstPlugin * plugin) { /* register some standard builtin types */ - g_assert (gst_element_register (plugin, "bin", GST_RANK_PRIMARY, - GST_TYPE_BIN)); - g_assert (gst_element_register (plugin, "pipeline", GST_RANK_PRIMARY, - GST_TYPE_PIPELINE)); - g_assert (gst_element_register (plugin, "thread", GST_RANK_PRIMARY, - GST_TYPE_THREAD)); - g_assert (gst_element_register (plugin, "queue", GST_RANK_PRIMARY, - GST_TYPE_QUEUE)); + if (!gst_element_register (plugin, "bin", GST_RANK_PRIMARY, + GST_TYPE_BIN) || + !gst_element_register (plugin, "pipeline", GST_RANK_PRIMARY, + GST_TYPE_PIPELINE) || + !gst_element_register (plugin, "thread", GST_RANK_PRIMARY, + GST_TYPE_THREAD) || + !gst_element_register (plugin, "queue", GST_RANK_PRIMARY, GST_TYPE_QUEUE)) + g_assert_not_reached (); return TRUE; } diff --git a/gst/gstinfo.c b/gst/gstinfo.c index adfbd5c..da74d94 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -1107,8 +1107,17 @@ _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n, } #endif /* HAVE_PRINTF_EXTENSION */ +#else /* !GST_DISABLE_GST_DEBUG */ + +gboolean +__gst_in_valgrind (void) +{ + return FALSE; +} + #endif /* GST_DISABLE_GST_DEBUG */ + #ifdef GST_ENABLE_FUNC_INSTRUMENTATION /* FIXME make this thread specific */ static GSList *stack_trace = NULL; -- 2.7.4