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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user