From 653465a1b1a1b362ff3e35e36c1951cfbd6be2b5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 4 Aug 2020 18:15:19 +0200 Subject: pulse: handle device_name of NULL as error --- pipewire-pulseaudio/src/stream.c | 6 ++---- 1 file 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; } -- cgit v1.2.3