summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-04 18:15:19 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-04 18:15:19 +0200
commit653465a1b1a1b362ff3e35e36c1951cfbd6be2b5 (patch)
treea3da61c2c2944119c1da25759e1ee5373c2210fa
parent979fec288e2c02ab71bb802460bc1c835c0e5910 (diff)
pulse: handle device_name of NULL as error
-rw-r--r--pipewire-pulseaudio/src/stream.c6
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;
}