aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input/plugins/AlsaInputPlugin.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx
index f39574e43..da08a7c5d 100644
--- a/src/input/plugins/AlsaInputPlugin.cxx
+++ b/src/input/plugins/AlsaInputPlugin.cxx
@@ -159,11 +159,10 @@ inline InputStream *
AlsaInputStream::Create(const char *uri, Mutex &mutex, Cond &cond,
Error &error)
{
- const char *const scheme = "alsa://";
- if (!StringStartsWith(uri, scheme))
+ const char *device = StringAfterPrefix(uri, "alsa://");
+ if (device == nullptr)
return nullptr;
- const char *device = uri + strlen(scheme);
if (*device == 0)
device = default_device;