-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Evict the buffer against seekRangeStart #8026
Conversation
This avoid keep in the buffer content that is not necessary.
@@ -1424,7 +1424,7 @@ shaka.media.MediaSourceEngine = class { | |||
const ContentType = shaka.util.ManifestParserUtils.ContentType; | |||
if (contentType == ContentType.TEXT) { | |||
await this.textEngine_.remove(startTime, endTime); | |||
} else { | |||
} else if (endTime > startTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an optimization to avoid adding an operation that would do nothing.
lib/media/streaming_engine.js
Outdated
this.manifest_.presentationTimeline.getSeekRangeEnd(); | ||
|
||
let overflow = bufferedBehind - bufferBehind; | ||
if (seekRangeEnd - seekRangeStart > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some platforms require more than 1 second of buffer, otherwise errors occur.
Incremental code coverage: 100.00% |
This avoid keep in the buffer content that is not necessary.