[vlc-commits] demux: hls: try not to probe chunk for ts
Francois Cartegnie
git at videolan.org
Mon Jul 6 21:55:54 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 6 21:45:52 2015 +0200| [d6a2b97fbc00f6e0da568d014a02f22f707d4b67] | committer: Francois Cartegnie
demux: hls: try not to probe chunk for ts
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d6a2b97fbc00f6e0da568d014a02f22f707d4b67
---
modules/demux/hls/playlist/Parser.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 8ca1946..6053d15 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -109,6 +109,7 @@ void Parser::parseRepresentation(BaseAdaptationSet *adaptSet, const AttributesTa
{
const Attribute *uriAttr = streaminftag->getAttributeByName("URI");
const Attribute *bwAttr = streaminftag->getAttributeByName("BANDWIDTH");
+ const Attribute *codecsAttr = streaminftag->getAttributeByName("CODECS");
Representation *rep = new (std::nothrow) Representation(adaptSet);
if(rep)
@@ -123,6 +124,10 @@ void Parser::parseRepresentation(BaseAdaptationSet *adaptSet, const AttributesTa
if(bwAttr)
rep->setBandwidth(bwAttr->decimal());
+ /* if more than 1 codec, don't probe, can't be packed audio */
+ if(codecsAttr && codecsAttr->quotedString().find(',') != std::string::npos)
+ rep->setMimeType("video/mp2t");
+
parseSegments(rep, tagslist);
adaptSet->addRepresentation(rep);
More information about the vlc-commits
mailing list