[vlc-commits] demux: dash: match mime type

Francois Cartegnie git at videolan.org
Mon Dec 22 19:04:01 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec 20 00:08:18 2014 +0100| [6713191aded54131fc233750d60a7144caa0f916] | committer: Francois Cartegnie

demux: dash: match mime type

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

 modules/stream_filter/dash/dash.cpp |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/dash/dash.cpp b/modules/stream_filter/dash/dash.cpp
index 66aa38c..b0b2c29 100644
--- a/modules/stream_filter/dash/dash.cpp
+++ b/modules/stream_filter/dash/dash.cpp
@@ -99,7 +99,15 @@ static int Open(vlc_object_t *p_obj)
 {
     demux_t *p_demux = (demux_t*) p_obj;
 
-    if(!dash::xml::DOMParser::isDash(p_demux->s))
+    bool b_mimematched = false;
+    char *psz_mime = stream_ContentType(p_demux->s);
+    if(psz_mime)
+    {
+        b_mimematched = !strcmp(psz_mime, "application/dash+xml");
+        free(psz_mime);
+    }
+
+    if(!b_mimematched && !dash::xml::DOMParser::isDash(p_demux->s))
         return VLC_EGENERIC;
 
     //Build a XML tree



More information about the vlc-commits mailing list