stream: we can get the index before we are ready

This commit is contained in:
Wim Taymans 2020-05-12 17:50:24 +02:00
parent 8d5571fa4c
commit cab645d155

View file

@ -807,7 +807,6 @@ uint32_t pa_stream_get_index(PA_CONST pa_stream *s)
spa_assert(s); spa_assert(s);
spa_assert(s->refcount >= 1); spa_assert(s->refcount >= 1);
PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE, PA_INVALID_INDEX);
idx = s->stream ? pw_stream_get_node_id(s->stream) : PA_INVALID_INDEX; idx = s->stream ? pw_stream_get_node_id(s->stream) : PA_INVALID_INDEX;
pw_log_debug("stream %p: index %u", s, idx); pw_log_debug("stream %p: index %u", s, idx);