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

Use SourceBuffer `timestampOffset`

Open robwalch opened this issue 8 months ago • 0 comments

This PR will...

Use SourceBuffer timestampOffset rather than modify mp4 decode timestamps.

Why is this Pull Request needed?

Are there any points in the code the reviewer needs to double check?

This is a work-in-progress. Known issues include improper offset of discontinuities with MPEG-TS or muxed content. Additional testing and review is needed to find and fix the application of initPTS offsets on append.

Resolves issues:

  • #5715
  • #7310 (this is an issue with audio samples starting before video and the base media decode timestamp of audio of the first append being moved forward to 0 to avoid using a signed value for what is expected to be unsigned)

Checklist

  • [ ] changes have been done against master branch, and PR does not conflict
  • [ ] new unit / functional tests have been added (whenever applicable)
  • [ ] API or design changes are documented in API.md

robwalch avatar Jun 09 '25 19:06 robwalch