-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Legacy EME WebKitMediaKeys createSessions unknown error
https://bugs.webkit.org/show_bug.cgi?id=262874 rdar://116689080 Reviewed by Jer Noble. If a media resource protected with the legacy EME API loads very quickly, the media player in GPU process may try to generate a key request before the HTMLMediaElement in the web process has signaled it is OK to continue after a key request. Have HTMLMediaElement call player->setShouldContinueAfterKeyNeeded as soon as the media player is allocaged so it will know before media data loading begins. No new test added because the problem is extremely timing dependent and I was never able to reproduce in a layout test. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaPlayer): Call updateShouldContinueAfterNeedKey. * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::loadWithNextMediaEngine): Call shouldWaitForLoadingOfResource. (WebCore::MediaPlayer::setShouldContinueAfterKeyNeeded): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Add logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Check m_shouldContinueAfterKeyNeeded instead of calling up to the player. (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Add logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldContinueAfterKeyNeeded): Check m_shouldContinueAfterKeyNeeded instead of calling up to the player. (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded): Add logging. Canonical link: https://commits.webkit.org/275647@main
- Loading branch information
1 parent
01e08c9
commit cac2e64
Showing
4 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters