mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
stream: do some extra checks
This commit is contained in:
parent
ba215efed0
commit
a7d8e805ac
1 changed files with 2 additions and 1 deletions
|
|
@ -807,8 +807,9 @@ uint32_t pa_stream_get_index(PA_CONST pa_stream *s)
|
|||
|
||||
spa_assert(s);
|
||||
spa_assert(s->refcount >= 1);
|
||||
PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE, PA_INVALID_INDEX);
|
||||
|
||||
idx = pw_stream_get_node_id(s->stream);
|
||||
idx = s->stream ? pw_stream_get_node_id(s->stream) : PA_INVALID_INDEX;
|
||||
pw_log_debug("stream %p: index %u", s, idx);
|
||||
return idx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue