[vlc-devel] [vlc-commits] demux: ttml: probe without creating xmlreader

Jean-Baptiste Kempf jb at videolan.org
Wed Oct 7 21:32:03 CEST 2015


On 07 Oct, Francois Cartegnie wrote :
> Le 07/10/2015 19:28, Jean-Baptiste Kempf a écrit :
> > On 07 Oct, Francois Cartegnie wrote :
> >> +    uint8_t *p_peek;
> >> +    ssize_t i_peek = stream_Peek( p_demux->s, (const uint8_t **) &p_peek, 128 );
> >> +    if( i_peek < 32 || memcmp( p_peek, "<?xml", 5 ) ||
> >> +        !strnstr( (const char *) p_peek, "<tt ", i_peek ) )
> > 
> > That matches <tt in the first 128 characters, right?
> 
> but starting with xml header tag

Yes, but does anything in the spec says that it must start from byte
1(0) with a "<?xml"?
Can't it have spaces before "<?" ?

I'm seriously asking, I don't know.

Thanks for the precision.

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the vlc-devel mailing list