Comparing version 1.1.0 to 1.1.1
23
index.js
@@ -1,6 +0,6 @@ | ||
const BufferReader = require('./lib/buffer-reader') | ||
var BufferReader = require('./lib/buffer-reader') | ||
const XIPH_LACING = 1 | ||
const EBML_LACING = 3 | ||
const FIXED_SIZE_LACING = 2 | ||
var XIPH_LACING = 1 | ||
var EBML_LACING = 3 | ||
var FIXED_SIZE_LACING = 2 | ||
@@ -32,2 +32,3 @@ module.exports = function (buffer) { | ||
var i, frameSize | ||
var frames = [] | ||
@@ -40,4 +41,4 @@ var framesNum = reader.nextUInt8() + 1 // number of frames | ||
let frameSize = reader.length / framesNum | ||
for (let i = 0; i < framesNum; i++) { | ||
frameSize = reader.length / framesNum | ||
for (i = 0; i < framesNum; i++) { | ||
frames.push(reader.nextBuffer(frameSize)) | ||
@@ -51,5 +52,5 @@ } | ||
if (lacing === XIPH_LACING) { | ||
for (let i = 0; i < framesNum - 1; i++) { | ||
for (i = 0; i < framesNum - 1; i++) { | ||
var val | ||
let frameSize = 0 | ||
frameSize = 0 | ||
do { | ||
@@ -63,7 +64,7 @@ val = reader.nextUInt8() | ||
// first frame | ||
let frameSize = reader.nextUIntV() | ||
frameSize = reader.nextUIntV() | ||
frameSizes.push(frameSize) | ||
// middle frames | ||
for (let i = 1; i < framesNum - 1; i++) { | ||
for (i = 1; i < framesNum - 1; i++) { | ||
frameSize += reader.nextIntV() | ||
@@ -74,3 +75,3 @@ frameSizes.push(frameSize) | ||
for (let i = 0; i < framesNum - 1; i++) { | ||
for (i = 0; i < framesNum - 1; i++) { | ||
frames.push(reader.nextBuffer(frameSizes[i])) | ||
@@ -77,0 +78,0 @@ } |
{ | ||
"name": "ebml-block", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "EBML Block Parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137
6843