diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-08-04 18:15:19 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-08-04 18:15:19 +0200 |
commit | 653465a1b1a1b362ff3e35e36c1951cfbd6be2b5 (patch) | |
tree | a3da61c2c2944119c1da25759e1ee5373c2210fa | |
parent | 979fec288e2c02ab71bb802460bc1c835c0e5910 (diff) |
pulse: handle device_name of NULL as error
-rw-r--r-- | pipewire-pulseaudio/src/stream.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pipewire-pulseaudio/src/stream.c b/pipewire-pulseaudio/src/stream.c index 2bf351de..ebbb5be6 100644 --- a/pipewire-pulseaudio/src/stream.c +++ b/pipewire-pulseaudio/src/stream.c @@ -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; } |