Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(HLS): Fix duplicate hinted segments #4258

Merged

Conversation

joeyparrish
Copy link
Member

Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these. Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.

Closes #4223

Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these.  Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.
// If DURATION is missing from this partial segment, use the target
// partial duration from the top of the playlist, which is a required
// attribute for content with partial segments.
const pDuration = Number(item.getAttributeValue('DURATION')) ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

Technically this approach means that if a manifest has a tag with DURATION=0, we will ignore that. But I don't know why someone would want to do that, so it's probably fine to not account for it.

@avelad avelad added type: bug Something isn't working correctly component: HLS The issue involves Apple's HLS manifest format labels May 31, 2022
@avelad avelad added this to the v4.1 milestone May 31, 2022
@avelad
Copy link
Collaborator

avelad commented Jun 2, 2022

@theodab Is it ready to merge?

@joeyparrish
Copy link
Member Author

I had some disagreement with the original reporter of the issue via email, but I still believe this is the correct fix, and an important one based on the severity of the issue. I've informed them via email that we're going ahead with this fix.

@joeyparrish joeyparrish merged commit 9171f73 into shaka-project:main Jun 2, 2022
@joeyparrish joeyparrish added the priority: P0 Broken for everyone; no workaround; urgent label Jun 2, 2022
joeyparrish added a commit that referenced this pull request Jun 2, 2022
Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these.  Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.

Closes #4223
joeyparrish added a commit that referenced this pull request Jun 2, 2022
Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these.  Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.

Closes #4223
joeyparrish added a commit that referenced this pull request Jun 2, 2022
Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these.  Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.

Closes #4223
theodab pushed a commit to theodab/shaka-player that referenced this pull request Jun 3, 2022
Because zero-duration references cause such chaos, ensure that the HLS
parser never produces these.  Preload-hinted segments should use the
target duration for partial segments, and if that required attribute
is missing from the playlist, then preload-hinted segments should be
skipped.

Closes shaka-project#4223
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
@joeyparrish joeyparrish deleted the fix-duplicate-hint-segments branch September 2, 2023 02:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P0 Broken for everyone; no workaround; urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LL-HLS: Preload hinted fragments is played twice sometimes
3 participants