[vlc-commits] demux: adaptive: check connection for content-type

Francois Cartegnie git at videolan.org
Wed Aug 8 16:01:09 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug  8 13:33:15 2018 +0200| [e970754d2142b47c14f29d2ec3dfee691f64d815] | committer: Francois Cartegnie

demux: adaptive: check connection for content-type

(cherry picked from commit fa4d9d65fd8aefcf29a9d3945150410616c005e5)

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

 modules/demux/adaptive/http/Chunk.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index fbe3b8cee8..800c77717f 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -218,7 +218,10 @@ block_t * HTTPChunkSource::read(size_t readsize)
 
 std::string HTTPChunkSource::getContentType() const
 {
-    return connection->getContentType();
+    if(connection)
+        return connection->getContentType();
+    else
+        return std::string();
 }
 
 bool HTTPChunkSource::prepare()



More information about the vlc-commits mailing list