[vlc-commits] demux: adaptive: remove redir count parameter
Francois Cartegnie
git at videolan.org
Thu Feb 15 10:17:59 CET 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 13 14:04:13 2018 +0100| [566db04c284a235c1ba3c1e996c27c4dc65defa1] | committer: Francois Cartegnie
demux: adaptive: remove redir count parameter
(cherry picked from commit 954874105214e31dbf9b9e05fbd7c12e9b8dd9ca)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=566db04c284a235c1ba3c1e996c27c4dc65defa1
---
modules/demux/adaptive/http/Chunk.cpp | 5 +++--
modules/demux/adaptive/http/Chunk.h | 2 +-
modules/demux/adaptive/http/HTTPConnection.hpp | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index 5dad106e1a..25b33961e2 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -204,7 +204,7 @@ block_t * HTTPChunkSource::read(size_t readsize)
return p_block;
}
-bool HTTPChunkSource::prepare(int i_redir)
+bool HTTPChunkSource::prepare()
{
if(prepared)
return true;
@@ -214,7 +214,8 @@ bool HTTPChunkSource::prepare(int i_redir)
ConnectionParams connparams = params; /* can be changed on 301 */
- while(i_redir++ < 3)
+ int i_redirects = 0;
+ while(i_redirects++ < HTTPConnection::MAX_REDIRECTS)
{
if(!connection)
{
diff --git a/modules/demux/adaptive/http/Chunk.h b/modules/demux/adaptive/http/Chunk.h
index fba01cbfbf..a92c20ee6a 100644
--- a/modules/demux/adaptive/http/Chunk.h
+++ b/modules/demux/adaptive/http/Chunk.h
@@ -94,7 +94,7 @@ namespace adaptive
static const size_t CHUNK_SIZE = 32768;
protected:
- virtual bool prepare(int = 0);
+ virtual bool prepare();
AbstractConnection *connection;
AbstractConnectionManager *connManager;
size_t consumed; /* read pointer */
diff --git a/modules/demux/adaptive/http/HTTPConnection.hpp b/modules/demux/adaptive/http/HTTPConnection.hpp
index fcccb22a66..ce19cb166d 100644
--- a/modules/demux/adaptive/http/HTTPConnection.hpp
+++ b/modules/demux/adaptive/http/HTTPConnection.hpp
@@ -74,6 +74,7 @@ namespace adaptive
void setUsed( bool );
const ConnectionParams &getRedirection() const;
+ static const unsigned MAX_REDIRECTS = 3;
protected:
virtual bool connected () const;
More information about the vlc-commits
mailing list