diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-01 21:39:30 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-02 11:49:17 +0100 |
commit | a3c393248a69a2ec7dd8ce168ef2f07cb93bac1b (patch) | |
tree | 9c6a821b71b73017a60d5203f48a466bec7bd88c | |
parent | cee10cb439afa1cb74db5c62884d4999a4c1afac (diff) |
pulsesink: don't do logic within g_assert() statements
Otherwise that code will just be expanded to nothing when compiled
-DG_DISABLE_ASSERT (PS: why is mainloop_start() called in the init
function and not when changing state to READY?)
-rw-r--r-- | ext/pulse/pulsesink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index 9839129a..0b910646 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -1553,6 +1553,8 @@ server_dead: static void gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass) { + guint res; + pulsesink->server = NULL; pulsesink->device = NULL; pulsesink->device_description = NULL; @@ -1568,8 +1570,10 @@ gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass) GST_DEBUG_OBJECT (pulsesink, "using pulseaudio version %s", pulsesink->pa_version); - g_assert ((pulsesink->mainloop = pa_threaded_mainloop_new ())); - g_assert (pa_threaded_mainloop_start (pulsesink->mainloop) == 0); + pulsesink->mainloop = pa_threaded_mainloop_new (); + g_assert (pulsesink->mainloop != NULL); + res = pa_threaded_mainloop_start (pulsesink->mainloop); + g_assert (res == 0); /* TRUE for sinks, FALSE for sources */ pulsesink->probe = gst_pulseprobe_new (G_OBJECT (pulsesink), |