[vlc-commits] demux: ttml: fix utf8 doctype probing

Francois Cartegnie git at videolan.org
Tue May 30 13:37:52 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 30 13:36:55 2017 +0200| [de586d19732dfcfb3e7811ab54f696c0bc6c781f] | committer: Francois Cartegnie

demux: ttml: fix utf8 doctype probing

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

 modules/demux/ttml.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index e2a59154e0..146d129ff8 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -404,6 +404,7 @@ int OpenDemux( vlc_object_t* p_this )
     const char *psz_xml = (const char *) p_peek;
     size_t i_xml  = i_peek;
 
+    /* Try to probe without xml module/loading the full document */
     char *psz_alloc = NULL;
     switch( GetQWBE(p_peek) )
     {
@@ -422,7 +423,8 @@ int OpenDemux( vlc_object_t* p_this )
         case UINT64_C(0x003C003F00740074): /* UTF16-BE <tt */
             psz_alloc = FromCharset( "UTF-16BE", p_peek, i_peek );
             break;
-        case UINT64_C(0xEFBBBF3C3F786D20): /* UTF8 BOM<?xml */
+        case UINT64_C(0xEFBBBF3C3F786D6C): /* UTF8 BOM<?xml */
+        case UINT64_C(0x3C3F786D6C207665): /* UTF8 <?xml ve */
         case UINT64_C(0xEFBBBF3C74742078): /* UTF8 BOM<tt x*/
             break;
         default:



More information about the vlc-commits mailing list