summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulse/stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 9a0ea0fd..a7fccc86 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -948,6 +948,7 @@ static int create_stream(
PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED);
PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED);
+ PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
/* Althought some of the other flags are not supported on older
* version, we don't check for them here, because it doesn't hurt
* when they are passed but actually not supported. This makes