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 detach attach behavior dropping one of two SourceBuffers #5974

Merged
merged 1 commit into from Nov 15, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Nov 14, 2023

This PR will...

Fix SourceBuffer reset regression introduced in dev with #5911 (not reproducible in v1.14.x).

Why is this Pull Request needed?

_bufferCodecEventsTotal should not be reset on BUFFER_CODECS. It is only set once on manifest parsed and its value is needed to reset SourceBuffers on detach/attach or recoverMediaError with unmuxed HLS assets.

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

We may want to replace _bufferCodecEventsTotal and bufferCodecEventsExpected with a map of tracks/SourceBuffer types ('audio' and/or 'video' or 'audiovideo') to manage SourceBuffer creation on init segment parsed. If you have trouble with MSE setup/reset or an irregular stream like #1510 leave a comment or file an issue mentioning this note.

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

@robwalch robwalch added this to the 1.5.0 milestone Nov 14, 2023
@robwalch robwalch merged commit 2426742 into master Nov 15, 2023
15 of 16 checks passed
@robwalch robwalch deleted the bugfix/detach-attach-sb-count branch November 15, 2023 00:54
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.

None yet

1 participant