-
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
fix: Manually order key for decodingInfo cache #4795
fix: Manually order key for decodingInfo cache #4795
Conversation
Based on @joeyparrish's comments on #4789. |
Incremental code coverage: 100.00% |
lib/util/stream_utils.js
Outdated
@@ -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 |
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.
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.
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.
Actually, I just thought of a better approach for this that should be less brittle. Let me give it a shot...
No description provided.