mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
client: verify connection state in pa_stream_connect_upload()
Make suer we check the connection state before going on, so that we can rely that s->context->pstream is properly initialized. https://bugzilla.redhat.com/show_bug.cgi?id=539500
This commit is contained in:
parent
bf50dc4230
commit
78811c5653
1 changed files with 1 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) {
|
|||
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
|
||||
PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID);
|
||||
PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID);
|
||||
PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
|
||||
|
||||
if (!(name = pa_proplist_gets(s->proplist, PA_PROP_EVENT_ID)))
|
||||
name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue