Commit d87cf514 authored by Max Kellermann's avatar Max Kellermann

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.
parent 87eb5cbc
......@@ -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
......
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