[vlc-commits] demux: adaptive: force access fallback for local uri

Francois Cartegnie git at videolan.org
Wed Oct 16 20:21:15 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 16 19:21:11 2019 +0200| [7001edb2ddea01518f8582b84e62af0a4193886d] | committer: Francois Cartegnie

demux: adaptive: force access fallback for local uri

allows local playback without use-access flag

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7001edb2ddea01518f8582b84e62af0a4193886d
---

 modules/demux/adaptive/http/HTTPConnectionManager.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/http/HTTPConnectionManager.cpp b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
index 4ad8e9f361..96967afd76 100644
--- a/modules/demux/adaptive/http/HTTPConnectionManager.cpp
+++ b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
@@ -109,8 +109,13 @@ AbstractConnection * HTTPConnectionManager::getConnection(ConnectionParams &para
     if(unlikely(!factory || !downloader))
         return NULL;
 
-    if(!localAllowed && params.isLocal())
-        return NULL;
+    if(params.isLocal())
+    {
+        if(!localAllowed)
+            return NULL;
+        /* Only access can read local files */
+        params.setUseAccess(true);
+    }
 
     vlc_mutex_lock(&lock);
     AbstractConnection *conn = reuseConnection(params);



More information about the vlc-commits mailing list