Commit ea07b73e authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ttml: probe tags with breaks

refs #19329
parent dbab2b35
......@@ -36,6 +36,7 @@
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include "../codec/ttml/ttml.h"
......@@ -439,8 +440,9 @@ int tt_OpenDemux( vlc_object_t* p_this )
}
/* Simplified probing. Valid TTML must have a namespace declaration */
const char *psz_tt = strnstr( psz_xml, "tt ", i_xml );
const char *psz_tt = strnstr( psz_xml, "tt", i_xml );
if( !psz_tt || psz_tt == psz_xml ||
((size_t)(&psz_tt[2] - (const char*)p_peek)) == i_xml || isalpha(psz_tt[2]) ||
(psz_tt[-1] != ':' && psz_tt[-1] != '<') )
{
free( psz_alloc );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment