Commit 3dc989bc authored by Max Kellermann's avatar Max Kellermann

input/alsa: use StringAfterPrefix()

parent 75d46efd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment