diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2013-12-30 14:46:32 +0400 |
---|---|---|
committer | Anssi Hannula <anssi.hannula@iki.fi> | 2014-01-03 17:05:48 +0400 |
commit | 857841c1b63bf3ffacef03da2bd6275d55ead769 (patch) | |
tree | 2c1365157da82b865a75e57dd2e5d900d82a8768 /libavformat/http.c | |
parent | 0588acaffaf601bf47088bfa19bef49b173beb8c (diff) |
avformat/http: always allow no-op seek
This also allows checking stream position as per ffurl_seek() doxy.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index fd29966e2a..3b655c6673 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -947,6 +947,8 @@ 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 -1; |