hls.js 1.5.14-0.canary.10669 → 1.5.14-0.canary.10670

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -130,5 +130,5 @@
130
130
  "url-toolkit": "2.2.5",
131
131
  "wrangler": "3.80.0"
132
132
  },
133
- "version": "1.5.14-0.canary.10669"
133
+ "version": "1.5.14-0.canary.10670"
134
134
  }
@@ -1,4 +1,5 @@
1
1
  import BaseVideoParser from './base-video-parser';
2
+ import type { ParsedVideoSample } from '../tsdemuxer';
2
3
  import type {
3
4
  DemuxedVideoTrack,
4
5
  DemuxedUserdataTrack,
@@ -180,7 +181,7 @@ class HevcVideoParser extends BaseVideoParser {
180
181
  track.params[prop] = config[prop];
181
182
  }
182
183
  }
183
- if (this.initVPS !== null || track.pps.length === 0) {
184
+ if (track.vps !== undefined && track.vps[0] === this.initVPS) {
184
185
  track.pps.push(unit.data);
185
186
  }
186
187
  }
@@ -239,6 +240,16 @@ class HevcVideoParser extends BaseVideoParser {
239
240
  return new Uint8Array(dst.buffer, 0, dstIdx);
240
241
  }
241
242
 
243
+ protected pushAccessUnit(
244
+ VideoSample: ParsedVideoSample,
245
+ videoTrack: DemuxedVideoTrack,
246
+ ) {
247
+ super.pushAccessUnit(VideoSample, videoTrack);
248
+ if (this.initVPS) {
249
+ this.initVPS = null; // null initVPS to prevent possible track's sps/pps growth until next VPS
250
+ }
251
+ }
252
+
242
253
  readVPS(vps: Uint8Array): {
243
254
  numTemporalLayers: number;
244
255
  temporalIdNested: boolean;