From: Anssi Hannula <[email protected]>

This also allows checking stream position as per ffurl_seek() doxy.
---
 libavformat/http.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index 86f2c92..77f6477 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -806,6 +806,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;
 
-- 
1.9.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to