Skip to content

Fix mapPartIntersection loop bounds - #7859

Merged
robwalch merged 1 commit into
video-dev:masterfrom
sugarzyc:codex/fix-map-part-intersection-loop
May 20, 2026
Merged

Fix mapPartIntersection loop bounds#7859
robwalch merged 1 commit into
video-dev:masterfrom
sugarzyc:codex/fix-map-part-intersection-loop

Conversation

@sugarzyc

Copy link
Copy Markdown
Contributor

Fixes #7855.

This updates mapPartIntersection so the loop stops before oldParts.length instead of reading one past the end. It also adds a focused regression test that fails if the helper tries to access oldParts[oldParts.length].

Verification:

  • npm run lint:quiet -- src/utils/level-helper.ts tests/unit/controller/level-helper.ts
  • npm run type-check
  • ./node_modules/.bin/karma start karma.conf.js --client.mocha.grep='mapPartIntersection'
@robwalch robwalch added the skip-change-log Do not include the PR in the change log in the release label May 20, 2026
@robwalch
robwalch merged commit eb6b59e into video-dev:master May 20, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Top priorities to Done in HLS.js Release Planning and Backlog May 20, 2026
robwalch pushed a commit that referenced this pull request Aug 5, 2026
@robwalch robwalch modified the milestones: 1.7.0, 1.6.17 Aug 5, 2026
robwalch added a commit that referenced this pull request Aug 5, 2026
* patch/v1.6.x:
  Fix mapPartIntersection loop bounds (#7859)
  Fix initial reload time of live media playlist loaded with `hls.loadSource()` Fixes #7556 Closes #7453
  Fix "discontinuity sequence mismatch" for fragment hint with no parts Fixes #7962
  fix: correct computeInitPts rollover condition causing segment 0 loop  (#7752)
  Cherry-pick changes from #7799
  Limit buffering while paused outside live sliding window (#7788)
  Fix Interstitials live start with short sliding window (N3 or less / no seek on start)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-change-log Do not include the PR in the change log in the release

2 participants