From: <tp...@ke...> - 2011-01-08 14:59:44
|
Module: gst-plugins-bad Branch: master Commit: 3145eac5771e62084000d9585b6ccddf258b2186 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3145eac5771e62084000d9585b6ccddf258b2186 Author: Tim-Philipp Müller <tim...@co...> Date: Sat Jan 8 00:01:01 2011 +0000 directfb: don't put code with side-effects into g_assert() It will all be turned into a NOOP if -DG_DISABLE_ASSERT is used (as it is for pre-releases and releases). --- ext/directfb/dfb-example.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ext/directfb/dfb-example.c b/ext/directfb/dfb-example.c index 17dbce3..59bbd4a 100644 --- a/ext/directfb/dfb-example.c +++ b/ext/directfb/dfb-example.c @@ -57,7 +57,8 @@ main (int argc, char *argv[]) /* Adding elements to the pipeline */ gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL); - g_assert (gst_element_link (src, sink)); + if (!gst_element_link (src, sink)) + g_error ("Couldn't link videotestsrc and dfbvideosink"); /* Let's play ! */ gst_element_set_state (pipeline, GST_STATE_PLAYING); |