Skip to content
Snippets Groups Projects
Commit ab76d9f6 authored by Anssi Hannula's avatar Anssi Hannula Committed by Luca Barbato
Browse files

http: Always allow no-op seek


This also allows checking stream position as per ffurl_seek() doxy.

Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>
parent 2ec33d27
No related branches found
No related tags found
No related merge requests found
...@@ -901,6 +901,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) ...@@ -901,6 +901,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence)
if (whence == AVSEEK_SIZE) if (whence == AVSEEK_SIZE)
return s->filesize; return s->filesize;
else if ((whence == SEEK_CUR && off == 0) ||
(whence == SEEK_SET && off == s->off))
return s->off;
else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed) else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment