aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-06-30 02:43:36 +0000
committerEric Wong <normalperson@yhbt.net>2008-06-30 02:43:36 +0000
commita889684acdabb5936813f047439937f842221ce1 (patch)
tree2d5f71ee04719120c1165653b58e05e0fd348562 /src
parentc7d1ce07f36186d3f2410ce0fa1ca7c4e7095a8e (diff)
downloadmpd-a889684acdabb5936813f047439937f842221ce1.tar.gz
mpd-a889684acdabb5936813f047439937f842221ce1.tar.xz
mpd-a889684acdabb5936813f047439937f842221ce1.zip
http: hopefully allow seeking to work on static files
git-svn-id: https://svn.musicpd.org/mpd/trunk@7398 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputStream_http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index f2dadf4e3..48972ac8b 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -686,7 +686,6 @@ static int recv_response(InputStream * is)
parse_headers(is, response, needle);
if (is->size <= 0)
is->seekable = 0;
- is->seekable = 0;
needle += sizeof("\r\n\r\n") - 1;
peeked = needle - response;
assert(peeked <= r);
@@ -810,6 +809,8 @@ int inputStream_httpSeek(InputStream * is, long offset, int whence)
}
diff = is->offset - old_offset;
+ if (!diff)
+ return 0; /* nothing to seek */
if (diff > 0) { /* seek forward if we've already buffered it */
long avail = (long)ringbuf_read_space(data->rb);
if (avail >= diff) {