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: Manually order key for decodingInfo cache #4795

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

theodab
Copy link
Contributor

@theodab theodab commented Dec 6, 2022

No description provided.

@theodab theodab added the type: bug Something isn't working correctly label Dec 6, 2022
@theodab theodab requested a review from joeyparrish December 6, 2022 20:08
@theodab
Copy link
Contributor Author

theodab commented Dec 6, 2022

Based on @joeyparrish's comments on #4789.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Incremental code coverage: 100.00%

avelad
avelad previously approved these changes Dec 6, 2022
@avelad avelad added this to the v4.4 milestone Dec 6, 2022
@avelad avelad added the priority: P1 Big impact or workaround impractical; resolve before feature release label Dec 6, 2022
@@ -510,10 +510,45 @@ shaka.util.StreamUtils = class {
* @private
*/
static async getDecodingInfosForVariant_(variant, decodingConfig) {
// Construct a key for that decoding config. By using this instead of plain
Copy link
Member

Choose a reason for hiding this comment

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

I don't love that this is brittle against future changes to MediaCapabilities, and the failure mode is worse now. We would have to add new fields here or else end up with potentially bogus results (where cache hits ignore certain fields).

We can defer this part, IMO. Iteration order is spec'd as the order the fields were created in, and that should hold well enough for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I just thought of a better approach for this that should be less brittle. Let me give it a shot...

@joeyparrish joeyparrish merged commit 806a9a8 into shaka-project:main Dec 7, 2022
@theodab theodab deleted the mcapBranchTwoTheSequel branch December 7, 2022 22:49
@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.

3 participants