[vlc-devel] [PATCH] http: don't reconnect if offset is equal to or larger than file size

Zhao Zhili wantlamy at gmail.com
Tue Mar 8 16:57:41 CET 2016


---
 modules/access/http/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/access/http/file.c b/modules/access/http/file.c
index 5695c7f..3860625 100644
--- a/modules/access/http/file.c
+++ b/modules/access/http/file.c
@@ -253,6 +253,7 @@ block_t *vlc_http_file_read(struct vlc_http_file *file)
     if (block == NULL)
     {   /* Automatically reconnect if server supports seek */
         if (vlc_http_file_can_seek(file)
+         && file->offset < vlc_http_file_get_size(file)
          && vlc_http_file_seek(file, file->offset) == 0)
             block = vlc_http_res_read(file->resp);

-- 
1.9.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160308/7c8eb9bf/attachment.html>


More information about the vlc-devel mailing list