mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse: handle device_name of NULL as error
This commit is contained in:
parent
979fec288e
commit
653465a1b1
1 changed files with 2 additions and 4 deletions
|
|
@ -751,11 +751,9 @@ const char *pa_stream_get_device_name(PA_CONST pa_stream *s)
|
|||
|
||||
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
|
||||
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
|
||||
// PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->device_name, PA_ERR_BADSTATE);
|
||||
|
||||
if (s->device_name == NULL)
|
||||
return "unnamed";
|
||||
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->device_name, PA_ERR_BADSTATE);
|
||||
|
||||
pw_log_trace("stream %p: %s %d", s, s->device_name, s->device_index);
|
||||
return s->device_name;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue