Skip to content

Conversation

@robwalch
Copy link
Collaborator

This PR will...

  • Handle certain cases where live playlists should not align on PDT.
  • Fixes subtitle start offset when adjusted before first segment load.

Why is this Pull Request needed?

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

Resolves issues:

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

Copy link
Collaborator

@hongjun-bae hongjun-bae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this modification was made because simply increasing the tolerance cannot fundamentally resolve cases where the PDT alignment is completely incorrect.


const delta = (targetPDT - refPDT) / 1000 - (frag.start - refFrag.start);
const dateDifference = (targetPDT - refPDT) / 1000;
if (Math.abs(dateDifference) > Math.max(60, details.totalduration)) {
Copy link
Collaborator

@hongjun-bae hongjun-bae Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue of small timing gaps, such as 352ms, was raised in #7557, but what was the reason for setting the PDT to 60 seconds? Is there a specific reason why “totalduration” was set as the default value? I’m worried that I’m not allowing for enough discontinuities.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if the alignment fails like this, logging will be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants