From d87cf5146e8c64907a0c3ee6f3f36745163c295c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Aug 2014 21:39:12 +0200 Subject: 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. --- src/input/InputStream.cxx | 5 +++-- 1 file 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 @@ -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 -- cgit v1.2.3