diff options
author | Max Kellermann <max@duempel.org> | 2014-08-19 21:39:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-19 21:39:12 +0200 |
commit | d87cf5146e8c64907a0c3ee6f3f36745163c295c (patch) | |
tree | b67cac8d29deaf3c63eb3cebf315efb9ea011f66 /src/input | |
parent | 87eb5cbced0fc0c6646e0f9b4b78f649b9f84831 (diff) | |
download | mpd-d87cf5146e8c64907a0c3ee6f3f36745163c295c.tar.gz mpd-d87cf5146e8c64907a0c3ee6f3f36745163c295c.tar.xz mpd-d87cf5146e8c64907a0c3ee6f3f36745163c295c.zip |
InputStream: CheapSeeking() returns false only for HTTP
Seeking on NFS or SMB is cheap. Actually, only HTTP streams are
expensive to seek. This enables a few features on NFS/SMB files, for
example Ogg tags.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/InputStream.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx index e73cf75e7..f5efe8ef1 100644 --- a/src/input/InputStream.cxx +++ b/src/input/InputStream.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "InputStream.hxx" #include "thread/Cond.hxx" -#include "util/UriUtil.hxx" +#include "util/StringUtil.hxx" #include <assert.h> @@ -76,7 +76,8 @@ gcc_pure static bool ExpensiveSeeking(const char *uri) { - return uri_has_scheme(uri); + return StringStartsWith(uri, "http://") || + StringStartsWith(uri, "https://"); } bool |