Skip to content

Commit

Permalink
Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
phoboslab committed Feb 18, 2017
1 parent 7f580a7 commit 45cd708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ TS.prototype.parsePacket = function() {

// Can't use bit shifts here; we need 33 bits of precision,
// so we're using JavaScript's double number type. Also
// devide by the 90khz clock to get the pts in seconds
// divide by the 90khz clock to get the pts in seconds.
pts = (p32_30 * 1073741824 + p29_15 * 32768 + p14_0)/90000;

this.currentTime = pts;
Expand Down Expand Up @@ -164,7 +164,7 @@ TS.prototype.resync = function() {
for (var i = 0; i < 187; i++) {
if (this.bits.bytes[byteIndex + i] === 0x47) {

// Look for 5 more sync tokens, each 188 bytes appart
// Look for 4 more sync tokens, each 188 bytes appart
var foundSync = true;
for (var j = 1; j < 5; j++) {
if (this.bits.bytes[byteIndex + i + 188 * j] !== 0x47) {
Expand Down

0 comments on commit 45cd708

Please sign in to comment.