Support for extended TS streams

Hi Christian,

You will find the commit to support extended TS stream. I added one more for cosmetics.
Also i tested it on Windows using VS2012 and it is consistent with ANSI, but here i didn't add C code ;)

Regards