[vlc-commits] demux: adaptive: fix bogus recycling of access

Francois Cartegnie git at videolan.org
Thu May 14 10:18:50 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed May 13 18:09:09 2020 +0200| [6828786dc799d39d0083745ec19246f90854e608] | committer: Francois Cartegnie

demux: adaptive: fix bogus recycling of access

refs #24701

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

 modules/demux/adaptive/http/HTTPConnection.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp
index f25904d352..36354c5b90 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -498,9 +498,13 @@ void StreamUrlConnection::reset()
     bytesRange = BytesRange();
 }
 
-bool StreamUrlConnection::canReuse(const ConnectionParams &params) const
+bool StreamUrlConnection::canReuse(const ConnectionParams &params_) const
 {
-    return available && params.usesAccess();
+    if( !available || !params_.usesAccess() )
+        return false;
+    return (params.getHostname() == params_.getHostname() &&
+            params.getScheme() == params_.getScheme() &&
+            params.getPort() == params_.getPort());
 }
 
 enum RequestStatus



More information about the vlc-commits mailing list