diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/plugins/AlsaInputPlugin.cxx | 5 |
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; |