[vlc-devel] [PATCH] http: Set the seekable flag when a Content-Range header is parsed

Martin Storsjö martin at martin.st
Sun Aug 12 14:02:24 CEST 2012


ES File Explorer (a file browser on Android, that can read files
over SMB and provide them to other applications on the device via
a built in HTTP server) replies with "HTTP/1.1 200 OK" on the first
request (where the request included "Range: bytes=0-") instead of
"HTTP/1.1 206 Partial Content", and without any
"Accept-Ranges: bytes" header. It does set a
"Content-Range: bytes 0-xxx/yyy" header and does support seeking
just fine though, so identify it as seekable.
---
 modules/access/http.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/access/http.c b/modules/access/http.c
index 531b7f8..977c916 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1429,6 +1429,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
                 msg_Dbg( p_access, "stream size=%"PRIu64",pos=%"PRIu64",remaining=%"PRIu64,
                          i_nsize, i_ntell, p_sys->i_remaining);
             }
+            p_sys->b_seekable = true;
         }
         else if( !strcasecmp( psz, "Connection" ) ) {
             msg_Dbg( p_access, "Connection: %s",p );
-- 
1.7.10




More information about the vlc-devel mailing list