hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Index out of bounds exception in cea 608 parser

Open chelleccarlyle opened this issue 3 months ago • 1 comments

What version of Hls.js are you using?

1.6.15

What browser (including version) are you using?

Chrome 141.0.7390.108

What OS (including version) are you using?

Sequoia 15.6.1

Test stream

No response

Configuration

{}

Additional player setup steps

No response

Checklist

  • [x] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
  • [x] The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
  • [x] The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
  • [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [x] There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Load a stream that has more than 100 characters in a row of cea 608 captions
  2. Play stream for couple minutes or more until type error/fatal error occurs on console.

Expected behaviour

Stream should continue to play fine with stream that has 100 characters or more in a row of cea 608 captions over couple minutes or more playback.

What actually happened?

There is type error where this.chars[i] is undefined and trying to call function setPenStyles() after because i=100 and array size of this.chars is 100 which is limit value of NR_COLS.

Console output

TypeError: Cannot read properties of undefined (reading 'setPenState') at Row.setPenStyles  happening in node_modules/hls.js/dist/hls.mjs

Chrome media internals output


chelleccarlyle avatar Dec 04 '25 00:12 chelleccarlyle

Hi @chelleccarlyle,

Can you share any content that reproduces the issue to help validate the fix?

robwalch avatar Dec 09 '25 17:12 robwalch