summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-10-17 00:03:06 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-10-17 08:48:23 +0200
commit3188f5699b74f84126455c6e14836128bfae6f86 (patch)
tree09ec34120a3bd70aa8f9f6e8ce547ccd678d92d9
parentd64200f46b54d6eded3d0bcb845ff9fd91ad44e9 (diff)
pulse: adjust CHECK_DEAD_GOTO macro to glib style
-rw-r--r--ext/pulse/pulsemixerctrl.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/pulse/pulsemixerctrl.c b/ext/pulse/pulsemixerctrl.c
index cd3c8e243..8df084073 100644
--- a/ext/pulse/pulsemixerctrl.c
+++ b/ext/pulse/pulsemixerctrl.c
@@ -199,12 +199,15 @@ gst_pulsemixer_ctrl_success_cb (pa_context * context, int success,
pa_threaded_mainloop_signal (c->mainloop, 0);
}
-#define CHECK_DEAD_GOTO(c, label) do { \
-if (!(c)->context || pa_context_get_state((c)->context) != PA_CONTEXT_READY) { \
- GST_WARNING_OBJECT (c->object, "Not connected: %s", (c)->context ? pa_strerror(pa_context_errno((c)->context)) : "NULL"); \
- goto label; \
-} \
-} while(0);
+#define CHECK_DEAD_GOTO(c, label) \
+ G_STMT_START { \
+ if (!(c)->context || \
+ !PA_CONTEXT_IS_GOOD(pa_context_get_state((c)->context))) { \
+ GST_WARNING_OBJECT ((c)->object, "Not connected: %s", \
+ (c)->context ? pa_strerror(pa_context_errno((c)->context)) : "NULL"); \
+ goto label; \
+ } \
+ } G_STMT_END
static gboolean
gst_pulsemixer_ctrl_open (GstPulseMixerCtrl * c)