[vlc-commits] demux: adaptive: do not filter schemes
Francois Cartegnie
git at videolan.org
Sat Jul 9 18:42:43 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 6 20:15:36 2016 +0200| [473237f3ced10980396e5120142d974dddb21c5c] | committer: Francois Cartegnie
demux: adaptive: do not filter schemes
also fixes a mishandled exception.
let late fail on regular access creation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=473237f3ced10980396e5120142d974dddb21c5c
---
modules/demux/adaptive/Streams.cpp | 9 +++------
modules/demux/adaptive/http/Chunk.cpp | 2 +-
modules/demux/adaptive/http/HTTPConnectionManager.cpp | 5 +++++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index c0f8a4a..09b1505 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -196,13 +196,10 @@ bool AbstractStream::startDemux()
if(demuxer)
return false;
- try
- {
- demuxersource->Reset();
- demuxer = createDemux(format);
- } catch(int) {
+ demuxersource->Reset();
+ demuxer = createDemux(format);
+ if(!demuxer)
msg_Err(p_realdemux, "Failed to create demuxer");
- }
return !!demuxer;
}
diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index 38c8ec9..da27cc8 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -125,7 +125,7 @@ HTTPChunkSource::HTTPChunkSource(const std::string& url, HTTPConnectionManager *
prepared = false;
eof = false;
if(!init(url))
- throw VLC_EGENERIC;
+ eof = true;
}
HTTPChunkSource::~HTTPChunkSource()
diff --git a/modules/demux/adaptive/http/HTTPConnectionManager.cpp b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
index 969fd10..9a1b655 100644
--- a/modules/demux/adaptive/http/HTTPConnectionManager.cpp
+++ b/modules/demux/adaptive/http/HTTPConnectionManager.cpp
@@ -96,6 +96,11 @@ AbstractConnection * HTTPConnectionManager::getConnection(ConnectionParams ¶
if(!conn)
{
conn = factory->createConnection(p_object, params);
+ if(!conn)
+ {
+ vlc_mutex_unlock(&lock);
+ return NULL;
+ }
connectionPool.push_back(conn);
More information about the vlc-commits
mailing list