diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2014-03-06 18:40:01 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-03-15 09:51:17 -0400 |
commit | f859fed03d5d039430baea03a0ef35cfd6ac4abd (patch) | |
tree | 6fe58fa07c7daa22ac5043f6b6a31036c271695a | |
parent | 991e6fa35b4ad2df389ba7e1c2c58d064e295c76 (diff) | |
download | ffmpeg-f859fed03d5d039430baea03a0ef35cfd6ac4abd.tar.gz |
http: Always allow no-op seek
This also allows checking stream position as per ffurl_seek() doxy.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit ab76d9f628ad46e1d3bbf26c5bf1f87083f239ab)
-rw-r--r-- | libavformat/http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 54910a9c31..2656595ed2 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -901,6 +901,9 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) if (whence == AVSEEK_SIZE) 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) return AVERROR(ENOSYS); |