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(DASH): Evict empty indexes in MetaSegmentIndex #7272

Merged
merged 8 commits into from
Sep 11, 2024

Conversation

theodab
Copy link
Contributor

@theodab theodab commented Sep 6, 2024

Issue #6239

@theodab theodab added the component: DASH The issue involves the MPEG DASH manifest format label Sep 6, 2024
@theodab
Copy link
Contributor Author

theodab commented Sep 6, 2024

This is not extensively tested. I plan on doing some more practical testing later, and maybe writing a new unit test.

@shaka-bot
Copy link
Collaborator

shaka-bot commented Sep 6, 2024

Incremental code coverage: 94.12%

lib/media/segment_index.js Outdated Show resolved Hide resolved
@avelad avelad added type: bug Something isn't working correctly priority: P1 Big impact or workaround impractical; resolve before feature release labels Sep 9, 2024
Copy link
Member

@tykus160 tykus160 left a comment

Choose a reason for hiding this comment

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

Would be good to add some unit test for a new MetaSegmentIndex method.

Comment on lines +2506 to +2509
const segmentIndex = mediaState.stream.segmentIndex;
if (segmentIndex instanceof shaka.media.MetaSegmentIndex) {
segmentIndex.evictEmpty();
}
Copy link
Member

Choose a reason for hiding this comment

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

Did you move it here due to performance reasons?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial revision of this PR I put together in a hurry before lunch, and didn't get a good chance to test it for more than a minute or two. It turned out the place I was calling evictEmpty originally was just the wrong function, it wasn't being called often enough.

@avelad avelad merged commit c9998f9 into shaka-project:main Sep 11, 2024
14 of 15 checks passed
avelad added a commit that referenced this pull request Sep 11, 2024
Issue #6239

---------

Co-authored-by: Álvaro Velad Galván <[email protected]>
avelad added a commit that referenced this pull request Sep 11, 2024
Issue #6239

---------

Co-authored-by: Álvaro Velad Galván <[email protected]>
@theodab theodab deleted the evictOldBranch branch September 11, 2024 11:14
@avelad avelad added this to the v4.12 milestone Sep 12, 2024
joeyparrish pushed a commit that referenced this pull request Sep 13, 2024
Issue #6239

---------

Co-authored-by: Álvaro Velad Galván <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants