Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9ba628e9a29dbe1c7519f925f8e3f1ce94e73076
https://github.com/WebKit/WebKit/commit/9ba628e9a29dbe1c7519f925f8e3f1ce94e73076
Author: Xabier Rodriguez-Calvar <[email protected]>
Date: 2022-11-17 (Thu, 17 Nov 2022)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/platform/encryptedmedia/CDMProxy.h
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Log Message:
-----------
[EME] CDMInstanceProxy: Use weak ptr for keeping player
https://bugs.webkit.org/show_bug.cgi?id=247977
Reviewed by Philippe Normand.
Use WeakPtr for keeping media player ptr as it can be used after player is
destroyed. The media player can be removed by
HTMLMediaElement::load() request while still waiting for decryption key. CDM is
not aware of such case and tries to use
m_player ptr anyway that resuts with crash.
Also reset m_playbackBlockedWaitingForKey when calling load() as the player
will be re-created.
Patch by Andrzej Surdej <[email protected]> coming from
https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/900.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
* Source/WebCore/platform/encryptedmedia/CDMProxy.h:
(WebCore::CDMInstanceProxy::setPlayer):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
Canonical link: https://commits.webkit.org/256823@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes