[vlc-commits] demux: hls: reject subtitles
Francois Cartegnie
git at videolan.org
Tue Sep 22 00:38:51 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 16 23:22:46 2015 +0200| [f5bbc438d2882a1367b7d261f3033c89f9d20fe4] | committer: Francois Cartegnie
demux: hls: reject subtitles
We have no demuxer for it
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5bbc438d2882a1367b7d261f3033c89f9d20fe4
---
modules/demux/hls/HLSStreamFormat.hpp | 2 ++
modules/demux/hls/HLSStreams.cpp | 5 ++++-
modules/demux/hls/playlist/Parser.cpp | 7 +++++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/modules/demux/hls/HLSStreamFormat.hpp b/modules/demux/hls/HLSStreamFormat.hpp
index cf5eefc..b4e513c 100644
--- a/modules/demux/hls/HLSStreamFormat.hpp
+++ b/modules/demux/hls/HLSStreamFormat.hpp
@@ -44,6 +44,8 @@ namespace hls
return StreamFormat(HLSStreamFormat::PACKEDAAC);
else if (tail == "mp2t")
return StreamFormat(HLSStreamFormat::MPEG2TS);
+ else if (tail == "binary")
+ return StreamFormat(HLSStreamFormat::UNSUPPORTED);
}
return StreamFormat();
}
diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index 81a4d74..999750d 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -32,10 +32,13 @@ AbstractStreamOutput *HLSStreamOutputFactory::create(demux_t *demux, const Strea
return new HLSPackedStreamOutput(demux, format, "any");
break;
- default:
case HLSStreamFormat::UNKNOWN:
case HLSStreamFormat::MPEG2TS:
return new BaseStreamOutput(demux, format, "ts");
+
+ case HLSStreamFormat::UNSUPPORTED:
+ default:
+ break;
}
return NULL;
}
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index a637bad0..8138429 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -397,6 +397,13 @@ M3U8 * M3U8Parser::parse(stream_t *p_stream, const std::string &playlisturl)
if(pair.second->getAttributeByName("NAME"))
altAdaptSet->description.Set(pair.second->getAttributeByName("NAME")->quotedString());
+ /* Subtitles unsupported for now */
+ if(pair.second->getAttributeByName("TYPE")->value != "AUDIO" &&
+ pair.second->getAttributeByName("TYPE")->value != "VIDEO")
+ {
+ rep->setMimeType("application/binary");
+ }
+
if(pair.second->getAttributeByName("LANGUAGE"))
{
std::string lang = pair.second->getAttributeByName("LANGUAGE")->quotedString();
More information about the vlc-commits
mailing list