fix nextChunkIndex
do all the calculations inside TSExtractor using int and not bytes (which are signed by default :-(( )