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

Account for overlapping sidx subsegment durations by parsing earlierstPresentationTime #6192

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Feb 7, 2024

This PR will...

Account for overlapping sidx subsegment durations by parsing earlierstPresentationTime

Why is this Pull Request needed?

Summing up all sidx box subsegment durations to get segment duration will add muxed audio and video track durations together without accounting for overlap. This bug was introduced with #4849 because earlierstPresentationTime was never parsed and potential for overlap was never taken into account.

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

I found overlapping sidx boxes in media from #1510 but had to change mp4-tools getDuration temporarily to ignore trun durations to see the impact that using overlapping durations from sidx boxes would have. This fix has not been verified against #6191 because a sample that reproduces the issue has not been provided.

Resolves issues:

Fixes #6191

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 robwalch added this to the 1.5.4 milestone Feb 7, 2024
@robwalch robwalch merged commit aadb239 into patch/v1.5.x Feb 7, 2024
12 of 14 checks passed
@robwalch robwalch deleted the bugfix/sidx-duration-overlap-earliest-presentation-time branch February 7, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant