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

Bugfix: Use audio PTS over playlist time when aligned with video #4808

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jul 21, 2022

This PR will...

Align audio to video rather than trusting playlist offsets when remuxing MPEG2-TS audio and video samples at the same time.

Why is this Pull Request needed?

Long playlists with inaccurate durations can result in incorrect fragment start times. The mp4-remuxer was always using video timestamps in these cases, but for audio was not, leading to cases where appended AV did not even overlap after seeking hours into a playlist with this kind of drift (#4418).

With this fix, the media is appended correctly, even if it's not where it was expected to be based on playlist content.

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

Resolves issues:

Fixes #4418

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.2.0 milestone Jul 21, 2022
@robwalch robwalch changed the title Use audio PTS over playlist time when aligned with video Bugfix: Use audio PTS over playlist time when aligned with video Jul 21, 2022
@robwalch robwalch merged commit 7d0752c into master Jul 26, 2022
@robwalch robwalch deleted the bugfix/remux-ts-audio-alignment branch July 26, 2022 17:29
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.

HLS.js fragment loading in an endless loop
1 participant