gst/gst.c: fix for G_DISABLE_ASSERT
authorBenjamin Otte <otte@gnome.org>
Tue, 3 Aug 2004 12:40:47 +0000 (12:40 +0000)
committerBenjamin Otte <otte@gnome.org>
Tue, 3 Aug 2004 12:40:47 +0000 (12:40 +0000)
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
gst/gst.c
gst/gstinfo.c

index 0fd31d3..9ad7781 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2004-08-03  Benjamin Otte  <otte@gnome.org>
 
+       * 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  <otte@gnome.org>
+
        * gst/parse/parse.l:
          fix for G_DISABLE_ASSERT
 
index 16e99ae..d1f9e8a 100644 (file)
--- 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;
 }
index adfbd5c..da74d94 100644 (file)
@@ -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;