aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_curl.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-16 20:42:08 +0100
committerMax Kellermann <max@duempel.org>2008-11-16 20:42:08 +0100
commit7591403566971eb19ba7bb16002eaa2689a637c7 (patch)
treecc08c5542d7e52b3bb3457b1e62fd209ba125be5 /src/input_curl.c
parent8882f062000ec6f86d932eee7c948d1369901c03 (diff)
downloadmpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.gz
mpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.xz
mpd-7591403566971eb19ba7bb16002eaa2689a637c7.zip
input_stream: size==-1 means unknown size
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
Diffstat (limited to 'src/input_curl.c')
-rw-r--r--src/input_curl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input_curl.c b/src/input_curl.c
index f908bf245..1d07674e9 100644
--- a/src/input_curl.c
+++ b/src/input_curl.c
@@ -581,6 +581,10 @@ input_curl_seek(struct input_stream *is, off_t offset, int whence)
break;
case SEEK_END:
+ if (is->size < 0)
+ /* stream size is not known */
+ return false;
+
is->offset = is->size + offset;
break;