[vlc-commits] demux: hls: add probing by mime type fallback

Francois Cartegnie git at videolan.org
Wed Feb 21 13:59:08 CET 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 21 13:24:39 2018 +0100| [c8ba5435acd96605dd1585b30432a26a30aeaf63] | committer: Francois Cartegnie

demux: hls: add probing by mime type fallback

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

 modules/demux/hls/HLSStreams.cpp      | 4 ++++
 modules/demux/hls/playlist/Parser.cpp | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index 3f5d4dccb5..60029f7a50 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -148,6 +148,10 @@ AbstractDemuxer *HLSStream::newDemux(demux_t *p_realdemux, const StreamFormat &f
                 ret->setRestartsOnEachSegment(true);
             break;
 
+        case StreamFormat::UNKNOWN:
+            ret = new MimeDemuxer(p_realdemux, this, out, source);
+            break;
+
         default:
         case StreamFormat::UNSUPPORTED:
             break;
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index b5490248c4..10c18554dc 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -99,7 +99,7 @@ void M3U8Parser::setFormatFromExtension(Representation *rep, const std::string &
         }
         else
         {
-            rep->streamFormat = StreamFormat(StreamFormat::UNSUPPORTED);
+            rep->streamFormat = StreamFormat(StreamFormat::UNKNOWN);
         }
     }
 }



More information about the vlc-commits mailing list