-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
clear buffer on unbuffered seek for updating media states #3795
Merged
theodab
merged 1 commit into
shaka-project:master
from
pcruiksh:bugfix/ensureBufferClearedOnSeekForUpdatingMediaState
Jan 14, 2022
Merged
clear buffer on unbuffered seek for updating media states #3795
theodab
merged 1 commit into
shaka-project:master
from
pcruiksh:bugfix/ensureBufferClearedOnSeekForUpdatingMediaState
Jan 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y buffer yet but are mid-update
@theodab can you review it and run the tests? Thanks! |
All tests passed! |
theodab
approved these changes
Jan 14, 2022
joeyparrish
pushed a commit
that referenced
this pull request
Jan 28, 2022
Previously, we only cleared the buffer if the media state had something buffered. This ensured that we did not pointlessly clear the buffer when nothing was there. However, this lead to problems if a seek was performed early during the loading process, before the source buffer is initialized. During that time, nothing is buffered, so we would not clear the buffer on a seek. This lead to us accidentally fetching content from the beginning of the presentation, rather than starting from the new clock time. This changes the streaming engine to also clear the buffer if mediaState.performingUpdate is true, to avoid that situation. Closes #3299
joeyparrish
pushed a commit
that referenced
this pull request
Jan 28, 2022
Previously, we only cleared the buffer if the media state had something buffered. This ensured that we did not pointlessly clear the buffer when nothing was there. However, this lead to problems if a seek was performed early during the loading process, before the source buffer is initialized. During that time, nothing is buffered, so we would not clear the buffer on a seek. This lead to us accidentally fetching content from the beginning of the presentation, rather than starting from the new clock time. This changes the streaming engine to also clear the buffer if mediaState.performingUpdate is true, to avoid that situation. Closes #3299
joeyparrish
pushed a commit
that referenced
this pull request
Jan 28, 2022
Previously, we only cleared the buffer if the media state had something buffered. This ensured that we did not pointlessly clear the buffer when nothing was there. However, this lead to problems if a seek was performed early during the loading process, before the source buffer is initialized. During that time, nothing is buffered, so we would not clear the buffer on a seek. This lead to us accidentally fetching content from the beginning of the presentation, rather than starting from the new clock time. This changes the streaming engine to also clear the buffer if mediaState.performingUpdate is true, to avoid that situation. Closes #3299
github-actions
bot
added
the
status: archived
Archived and locked; will not be updated
label
Jul 25, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ensure buffer is cleared on an unbuffered seek, for media states that are mid-update even if they have no buffer yet. This prevents the update operation from appending buffer for the old time and potentially getting one media state stuck buffering to catch up to the target seek position.
Fixes #3299
Screenshots (optional)
Type of change
not work as expected)
Checklist:
./build/all.py
and the build passes./build/test.py
and all tests pass