git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ca1d08
)
demux: ttml: probe document header less xml
author
Francois Cartegnie
<fcvlcdev@free.fr>
Fri, 26 May 2017 09:00:06 +0000
(11:00 +0200)
committer
Francois Cartegnie
<fcvlcdev@free.fr>
Fri, 26 May 2017 09:33:38 +0000
(11:33 +0200)
modules/demux/ttml.c
patch
|
blob
|
history
diff --git
a/modules/demux/ttml.c
b/modules/demux/ttml.c
index
6c81292
..
0569e01
100644
(file)
--- a/
modules/demux/ttml.c
+++ b/
modules/demux/ttml.c
@@
-408,20
+408,26
@@
int OpenDemux( vlc_object_t* p_this )
switch( GetQWBE(p_peek) )
{
/* See RFC 3023 Part 4 */
switch( GetQWBE(p_peek) )
{
/* See RFC 3023 Part 4 */
- case 0xFFFE3C003F007800UL: /* UTF16 BOM<?xml */
- case 0xFEFF003C003F0078UL: /* UTF16 BOM<?xml */
+ case 0xFFFE3C003F007800UL: /* UTF16 BOM<? */
+ case 0xFFFE3C003F007400UL: /* UTF16 BOM<t */
+ case 0xFEFF003C003F0078UL: /* UTF16 BOM<? */
+ case 0xFEFF003C003F0074UL: /* UTF16 BOM<t */
psz_alloc = FromCharset( "UTF-16", p_peek, i_peek );
break;
psz_alloc = FromCharset( "UTF-16", p_peek, i_peek );
break;
- case 0x3C003F0078006D00UL: /* UTF16-LE <?xml */
+ case 0x3C003F0078006D00UL: /* UTF16-LE <?xm */
+ case 0x3C003F0074007400UL: /* UTF16-LE <tt */
psz_alloc = FromCharset( "UTF-16LE", p_peek, i_peek );
break;
psz_alloc = FromCharset( "UTF-16LE", p_peek, i_peek );
break;
- case 0x003C003F0078006DUL: /* UTF16-BE <?xml */
+ case 0x003C003F0078006DUL: /* UTF16-BE <?xm */
+ case 0x003C003F00740074UL: /* UTF16-BE <tt */
psz_alloc = FromCharset( "UTF-16BE", p_peek, i_peek );
break;
psz_alloc = FromCharset( "UTF-16BE", p_peek, i_peek );
break;
- case 0x3C3F786D6C207665UL: /* UTF8 <?xml */
+ case 0xEFBBBF3C3F786D20UL: /* UTF8 BOM<?xml */
+ case 0xEFBBBF3C74742078UL: /* UTF8 BOM<tt x*/
break;
default:
break;
default:
- return VLC_EGENERIC;
+ if(GetDWBE(p_peek) != 0x3C747420U) /* tt node without xml document marker */
+ return VLC_EGENERIC;
}
if( psz_alloc )
}
if( psz_alloc )