Commit 9e050481 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

examples: don't put code with side-effects into g_assert()

Otherwise things won't work too well when compiling with
-DG_DISABLE_ASSERT (as we do for pre-releases and releases).
parent c2bc6327
...@@ -102,9 +102,12 @@ main (int argc, char *argv[]) ...@@ -102,9 +102,12 @@ main (int argc, char *argv[])
gst_bin_add_many (GST_BIN (pipeline), audiotestsrc, audioconvert, level, gst_bin_add_many (GST_BIN (pipeline), audiotestsrc, audioconvert, level,
fakesink, NULL); fakesink, NULL);
g_assert (gst_element_link (audiotestsrc, audioconvert)); if (!gst_element_link (audiotestsrc, audioconvert))
g_assert (gst_element_link_filtered (audioconvert, level, caps)); g_error ("Failed to link audiotestsrc and audioconvert");
g_assert (gst_element_link (level, fakesink)); if (!gst_element_link_filtered (audioconvert, level, caps))
g_error ("Failed to link audioconvert and level");
if (!gst_element_link (level, fakesink))
g_error ("Failed to link level and fakesink");
/* make sure we'll get messages */ /* make sure we'll get messages */
g_object_set (G_OBJECT (level), "message", TRUE, NULL); g_object_set (G_OBJECT (level), "message", TRUE, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment