mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
simple: use PA_xxx_IS_GOOD for state checks
This commit is contained in:
parent
5e61111a88
commit
a4bc41a7a5
1 changed files with 2 additions and 2 deletions
|
|
@ -70,8 +70,8 @@ struct pa_simple {
|
||||||
|
|
||||||
#define CHECK_DEAD_GOTO(p, rerror, label) \
|
#define CHECK_DEAD_GOTO(p, rerror, label) \
|
||||||
do { \
|
do { \
|
||||||
if (!(p)->context || pa_context_get_state((p)->context) != PA_CONTEXT_READY || \
|
if (!(p)->context || !PA_CONTEXT_IS_GOOD(pa_context_get_state((p)->context)) || \
|
||||||
!(p)->stream || pa_stream_get_state((p)->stream) != PA_STREAM_READY) { \
|
!(p)->stream || !PA_STREAM_IS_GOOD(pa_stream_get_state((p)->stream))) { \
|
||||||
if (((p)->context && pa_context_get_state((p)->context) == PA_CONTEXT_FAILED) || \
|
if (((p)->context && pa_context_get_state((p)->context) == PA_CONTEXT_FAILED) || \
|
||||||
((p)->stream && pa_stream_get_state((p)->stream) == PA_STREAM_FAILED)) { \
|
((p)->stream && pa_stream_get_state((p)->stream) == PA_STREAM_FAILED)) { \
|
||||||
if (rerror) \
|
if (rerror) \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue