summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-29 14:22:39 +0100
committerMax Kellermann <max@musicpd.org>2018-10-29 14:34:30 +0100
commit2dc5648e578a45c8822c81d036cfdc130bce5db1 (patch)
treebfe2c534af7bab53b5ca7f32e72bd180948cbd90 /src/input
parentd0349880da4538efe4b792c1522f4c54ab897046 (diff)
input/CdioParanoia: use StringAfterPrefixIgnoreCase()
Diffstat (limited to 'src/input')
-rw-r--r--src/input/plugins/CdioParanoiaInputPlugin.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx
index 90e0f1dae..fe3403e33 100644
--- a/src/input/plugins/CdioParanoiaInputPlugin.cxx
+++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx
@@ -26,7 +26,7 @@
#include "../InputStream.hxx"
#include "../InputPlugin.hxx"
#include "util/TruncateString.hxx"
-#include "util/ASCII.hxx"
+#include "util/StringCompare.hxx"
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
#include "system/ByteOrder.hxx"
@@ -130,11 +130,6 @@ struct cdio_uri {
static bool
parse_cdio_uri(struct cdio_uri *dest, const char *src)
{
- if (!StringStartsWithCaseASCII(src, "cdda://"))
- return false;
-
- src += 7;
-
if (*src == 0) {
/* play the whole CD in the default drive */
dest->device[0] = 0;
@@ -188,6 +183,9 @@ static InputStreamPtr
input_cdio_open(const char *uri,
Mutex &mutex)
{
+ uri = StringAfterPrefixIgnoreCase(uri, "cdda://");
+ assert(uri != nullptr);
+
struct cdio_uri parsed_uri;
if (!parse_cdio_uri(&parsed_uri, uri))
return nullptr;