[vlc-commits] demux: hls: feed codec strings

Francois Cartegnie git at videolan.org
Fri May 10 11:20:00 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 26 17:06:42 2019 +0200| [3e1ac38228101c3c22b692796e6e5e8fdde8d271] | committer: Francois Cartegnie

demux: hls: feed codec strings

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

 modules/demux/hls/playlist/Parser.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 3574fedf2e..4f4b01d167 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -150,6 +150,9 @@ Representation * M3U8Parser::createRepresentation(BaseAdaptationSet *adaptSet, c
         if(bwAttr)
             rep->setBandwidth(bwAttr->decimal());
 
+        if(tag->getAttributeByName("CODECS"))
+            rep->addCodecs(tag->getAttributeByName("CODECS")->quotedString());
+
         if(resAttr)
         {
             std::pair<int, int> res = resAttr->getResolution();
@@ -512,6 +515,9 @@ M3U8 * M3U8Parser::parse(vlc_object_t *p_object, stream_t *p_stream, const std::
                     desc += pair.second->getAttributeByName("NAME")->quotedString();
                 }
 
+                if(pair.second->getAttributeByName("CODECS"))
+                    rep->addCodecs(pair.second->getAttributeByName("CODECS")->quotedString());
+
                 if(!desc.empty())
                 {
                     altAdaptSet->description.Set(desc);



More information about the vlc-commits mailing list