Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ec2a9eedd03527a85fa3b7f40322b9f5e710a5f3
https://github.com/WebKit/WebKit/commit/ec2a9eedd03527a85fa3b7f40322b9f5e710a5f3
Author: Ruthvik Konda <[email protected]>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
Log Message:
-----------
CDMSessionAVContentKeySession::isAnyKeyUsable should check that content key
is available
https://bugs.webkit.org/show_bug.cgi?id=309534
rdar://171478431
Reviewed by Jean-Yves Avenard.
Check that `[contentKeyRequest() contentKey]` is non-nil in
`CDMSessionAVContentKeySession::isAnyKeyUsable()` so that
`canEnqueueSample()` returns false until the content key has
actually been derived. Without this, `isAnyKeyUsable()` returns
true based solely on key ID matching, allowing samples to be
enqueued before the content key is ready. The sample then reaches
`attachContentKeyToSample()` where `[contentKeyRequest() contentKey]`
is nil, triggering the ASSERT.
Also add a graceful nil check in `attachContentKeyToSample()` as
a safety net, keeping the existing ASSERT for debug builds.
*
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::isAnyKeyUsable const):
(WebCore::CDMSessionAVContentKeySession::attachContentKeyToSample):
Canonical link: https://commits.webkit.org/309033@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications