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.
This commit is contained in:
parent
87eb5cbced
commit
d87cf5146e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user