diff --git a/src/demux/sample-aes.js b/src/demux/sample-aes.js index 04f40119038..467edf91ba1 100644 --- a/src/demux/sample-aes.js +++ b/src/demux/sample-aes.js @@ -97,7 +97,7 @@ return; } - let curUnits = samples[sampleIndex].units.units; + let curUnits = samples[sampleIndex].units; for (;; unitIndex++) { if (unitIndex >= curUnits.length) { break; diff --git a/src/demux/tsdemuxer.js b/src/demux/tsdemuxer.js index bb325231e87..42bac224d4a 100644 --- a/src/demux/tsdemuxer.js +++ b/src/demux/tsdemuxer.js @@ -442,7 +442,7 @@ } pushAccesUnit(avcSample,avcTrack) { - if (avcSample.units.units.length && avcSample.frame) { + if (avcSample.units.length && avcSample.frame) { // only push AVC sample if starting with a keyframe is not mandatory OR // if keyframe already found in this fragment OR // keyframe found in last fragment (track.sps) AND @@ -643,7 +643,7 @@ } if(avcSample && push) { let units = avcSample.units; - units.units.push(unit); + units.push(unit); } }); // if last PES packet, push samples @@ -654,7 +654,7 @@ } _createAVCSample(key,pts,dts,debug) { - return { key : key, pts : pts, dts : dts, units : { units : [], length : 0}, debug : debug}; + return { key : key, pts : pts, dts : dts, units : [], debug : debug}; } _insertSampleInOrder(arr, data) { @@ -681,12 +681,12 @@ _getLastNalUnit() { let avcSample = this.avcSample, lastUnit; // try to fallback to previous sample if current one is empty - if (!avcSample || avcSample.units.units.length === 0) { + if (!avcSample || avcSample.units.length === 0) { let track = this._avcTrack, samples = track.samples; avcSample = samples[samples.length-1]; } if (avcSample) { - let units = avcSample.units.units; + let units = avcSample.units; lastUnit = units[units.length - 1]; } return lastUnit; diff --git a/src/remux/dummy-remuxer.js b/src/remux/dummy-remuxer.js index 993e75670b5..0b0b70e70d1 100644 --- a/src/remux/dummy-remuxer.js +++ b/src/remux/dummy-remuxer.js @@ -30,8 +30,8 @@ class DummyRemuxer { while (track.samples.length) { avcSample = track.samples.shift(); // loop through AVC sample NALUs - while (avcSample.units.units.length) { - unit = avcSample.units.units.shift(); + while (avcSample.units.length) { + unit = avcSample.units.shift(); } } //please lint diff --git a/src/remux/mp4-remuxer.js b/src/remux/mp4-remuxer.js index 1380d2c0b17..1dfe411ed1c 100644 --- a/src/remux/mp4-remuxer.js +++ b/src/remux/mp4-remuxer.js @@ -174,7 +174,7 @@ class MP4Remuxer { // for (let i = 0; i < track.samples.length; i++) { // let avcSample = track.samples[i]; - // let units = avcSample.units.units; + // let units = avcSample.units; // let unitsString = ''; // for (let j = 0; j < units.length ; j++) { // unitsString += units[j].type + ','; @@ -257,7 +257,7 @@ class MP4Remuxer { let nbNalu = 0, naluLen = 0; for (let i = 0 ; i < nbSamples; i++) { // compute total/avc sample length and nb of NAL units - let sample = inputSamples[i], units = sample.units.units, nbUnits = units.length, sampleLen = 0; + let sample = inputSamples[i], units = sample.units, nbUnits = units.length, sampleLen = 0; for (let j = 0; j < nbUnits; j++) { sampleLen += units[j].data.length; } @@ -297,7 +297,7 @@ class MP4Remuxer { for (let i = 0 ; i < nbSamples; i++) { let avcSample = inputSamples[i], - avcSampleUnits = avcSample.units.units, + avcSampleUnits = avcSample.units, mp4SampleLength = 0, compositionTimeOffset; // convert NALU bitstream to MP4 format (prepend NALU with size field)