mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
pulse: adjust CHECK_DEAD_GOTO macro to glib style
This commit is contained in:
parent
d64200f46b
commit
3188f5699b
1 changed files with 9 additions and 6 deletions
|
@ -199,12 +199,15 @@ gst_pulsemixer_ctrl_success_cb (pa_context * context, int success,
|
||||||
pa_threaded_mainloop_signal (c->mainloop, 0);
|
pa_threaded_mainloop_signal (c->mainloop, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_DEAD_GOTO(c, label) do { \
|
#define CHECK_DEAD_GOTO(c, label) \
|
||||||
if (!(c)->context || pa_context_get_state((c)->context) != PA_CONTEXT_READY) { \
|
G_STMT_START { \
|
||||||
GST_WARNING_OBJECT (c->object, "Not connected: %s", (c)->context ? pa_strerror(pa_context_errno((c)->context)) : "NULL"); \
|
if (!(c)->context || \
|
||||||
goto label; \
|
!PA_CONTEXT_IS_GOOD(pa_context_get_state((c)->context))) { \
|
||||||
} \
|
GST_WARNING_OBJECT ((c)->object, "Not connected: %s", \
|
||||||
} while(0);
|
(c)->context ? pa_strerror(pa_context_errno((c)->context)) : "NULL"); \
|
||||||
|
goto label; \
|
||||||
|
} \
|
||||||
|
} G_STMT_END
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_pulsemixer_ctrl_open (GstPulseMixerCtrl * c)
|
gst_pulsemixer_ctrl_open (GstPulseMixerCtrl * c)
|
||||||
|
|
Loading…
Reference in a new issue