WebKit Bugzilla
Attachment 339714 Details for
Bug 185244
: [EME][GStreamer] Crash when the mediaKeys are created before loading the media in debug conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185244-20180507150221.patch (text/plain), 2.68 KB, created by
Yacine Bandou
on 2018-05-07 06:02:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yacine Bandou
Created:
2018-05-07 06:02:21 PDT
Size:
2.68 KB
patch
obsolete
>Subversion Revision: 231044 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 771ba46c52fbf635347ec11a383b205143c41583..b49a9beb50c7062fa6b7938402af2e90c2587157 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-05-03 Yacine Bandou <yacine.bandou_ext@softathome.com> >+ >+ [EME][GStreamer] Crash when the mediaKeys are created before loading the media in debug conf >+ https://bugs.webkit.org/show_bug.cgi?id=185244 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The function "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached" is expected to be called once, >+ so there is an ASSERT(!m_cdmInstance). >+ But when the MediaKeys are created before loading the media, the cdminstance is created and attached >+ to the MediaPlayerPrivate via "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached" before loading >+ the media, then when the media is loading, the function "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached" >+ will be called several times via the function "mediaEngineWasUpdated" wich is called for each change >+ in the MediaElement state, thus the WebProcess crashes in the ASSERT(!m_cdmInstance). >+ >+ This commit avoid the crash by replacing the assert with a simple check. >+ >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: >+ (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached): >+ > 2018-05-03 Yacine Bandou <yacine.bandou_ext@softathome.com> > > [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >index 1557475e95fb6832105ba8d7938ca2486a90a4fd..a5b3810e89bd9c1a84bded53463283ffb938e4aa 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -1207,10 +1207,11 @@ unsigned MediaPlayerPrivateGStreamerBase::videoDecodedByteCount() const > #if ENABLE(ENCRYPTED_MEDIA) > void MediaPlayerPrivateGStreamerBase::cdmInstanceAttached(CDMInstance& instance) > { >- ASSERT(!m_cdmInstance); >- m_cdmInstance = &instance; >- GST_DEBUG_OBJECT(pipeline(), "CDM instance %p set", m_cdmInstance.get()); >- m_protectionCondition.notifyAll(); >+ if (m_cdmInstance != &instance) { >+ m_cdmInstance = &instance; >+ GST_DEBUG_OBJECT(pipeline(), "CDM instance %p set", m_cdmInstance.get()); >+ m_protectionCondition.notifyAll(); >+ } > } > > void MediaPlayerPrivateGStreamerBase::cdmInstanceDetached(CDMInstance& instance)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185244
:
339483
|
339501
|
339714
|
339809