summaryrefslogtreecommitdiff
path: root/ext/pulse/pulseprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pulse/pulseprobe.c')
-rw-r--r--ext/pulse/pulseprobe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/pulse/pulseprobe.c b/ext/pulse/pulseprobe.c
index b393b2c21..6ebbfb214 100644
--- a/ext/pulse/pulseprobe.c
+++ b/ext/pulse/pulseprobe.c
@@ -1,3 +1,5 @@
+/*-*- Mode: C; c-basic-offset: 2 -*-*/
+
/*
* GStreamer pulseaudio plugin
*
@@ -99,17 +101,21 @@ static gboolean
gst_pulseprobe_open (GstPulseProbe * c)
{
int e;
- gchar *name = gst_pulse_client_name ();
+ gchar *name;
g_assert (c);
GST_DEBUG_OBJECT (c->object, "probe open");
c->mainloop = pa_threaded_mainloop_new ();
- g_assert (c->mainloop);
+ if (!c->mainloop)
+ return FALSE;
e = pa_threaded_mainloop_start (c->mainloop);
- g_assert (e == 0);
+ if (e < 0)
+ return FALSE;
+
+ name = gst_pulse_client_name ();
pa_threaded_mainloop_lock (c->mainloop);