Skip to content

Append segment chunk strictly in order#3405

Merged
joeyparrish merged 3 commits intoshaka-project:masterfrom
harmonicinc-com:fix-append-buffer
May 17, 2021
Merged

Append segment chunk strictly in order#3405
joeyparrish merged 3 commits intoshaka-project:masterfrom
harmonicinc-com:fix-append-buffer

Conversation

@percytse
Copy link
Contributor

Description

Fixes #3404

Screenshots (optional)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

Checklist:

  • I have signed the Google CLA https://cla.developers.google.com
  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have verified my change on multiple browsers on different platforms
  • I have run ./build/all.py and the build passes
  • I have run ./build/test.py and all tests pass

loaded += readObj.value.byteLength;
if (streamDataCallback) {
streamDataCallback(readObj.value);
await streamDataCallback(readObj.value);
Copy link
Member

Choose a reason for hiding this comment

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

I see the callback in StreamingEngine is async, so this makes sense. But can you also please change the signature of the callback accordingly?

/**
 * @param {?function(BufferSource):!Promise} streamDataCallback
 */

Copy link
Member

Choose a reason for hiding this comment

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

Could you please do this in the entire codebase? There are others in lib/util/, lib/net/, externs/, etc. Thanks!

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label May 13, 2021
@percytse percytse requested a review from joeyparrish May 14, 2021 02:49
loaded += readObj.value.byteLength;
if (streamDataCallback) {
streamDataCallback(readObj.value);
await streamDataCallback(readObj.value);
Copy link
Member

Choose a reason for hiding this comment

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

Could you please do this in the entire codebase? There are others in lib/util/, lib/net/, externs/, etc. Thanks!

@joeyparrish joeyparrish added the priority: P1 Big impact or workaround impractical; resolve before feature release label May 14, 2021
@percytse percytse requested a review from joeyparrish May 15, 2021 06:57
@shaka-bot
Copy link
Collaborator

All tests passed!

@joeyparrish joeyparrish merged commit f09616f into shaka-project:master May 17, 2021
ismena pushed a commit that referenced this pull request May 17, 2021
An async process handles the appending of partial segments for LL-DASH.  This fixes the caller to wait on the results, so that partial segments are always appended in order.

Fixes #3404
@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

priority: P1 Big impact or workaround impractical; resolve before feature release 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.

Sometimes buffer append failure and cause gaps in LL-Dash

3 participants