Title: [227514] releases/WebKitGTK/webkit-2.18/Source/WebCore
- Revision
- 227514
- Author
- [email protected]
- Date
- 2018-01-24 03:05:37 -0800 (Wed, 24 Jan 2018)
Log Message
Merge r226947 - [GStreamer] Don't wait for draw condition variable when shutting down.
https://bugs.webkit.org/show_bug.cgi?id=180978
Patch by Sebastian Dröge <[email protected]> on 2018-01-15
Reviewed by Carlos Garcia Campos.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
By also waiting for the draw condition variable while shutting down,
it is possible that the GStreamer video sink is waiting for the main
thread to actually render the current frame, while at the same time
the main thread is waiting for the GStreamer video sink to shut down,
resulting in a deadlock.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (227513 => 227514)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2018-01-24 10:03:25 UTC (rev 227513)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2018-01-24 11:05:37 UTC (rev 227514)
@@ -1,3 +1,20 @@
+2018-01-15 Sebastian Dröge <[email protected]>
+
+ [GStreamer] Don't wait for draw condition variable when shutting down.
+ https://bugs.webkit.org/show_bug.cgi?id=180978
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
+ (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+ By also waiting for the draw condition variable while shutting down,
+ it is possible that the GStreamer video sink is waiting for the main
+ thread to actually render the current frame, while at the same time
+ the main thread is waiting for the GStreamer video sink to shut down,
+ resulting in a deadlock.
+
2017-10-06 Enrique Ocaña González <[email protected]>
[MSE][GStreamer] Seek on youtube.com/tv fails after r217185
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (227513 => 227514)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2018-01-24 10:03:25 UTC (rev 227513)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2018-01-24 11:05:37 UTC (rev 227514)
@@ -661,6 +661,8 @@
if (!m_renderingCanBeAccelerated) {
LockHolder locker(m_drawMutex);
+ if (m_drawCancelled)
+ return;
m_drawTimer.startOneShot(0_s);
m_drawCondition.wait(m_drawMutex);
return;
@@ -672,6 +674,8 @@
#else
{
LockHolder lock(m_drawMutex);
+ if (m_drawCancelled)
+ return;
if (!m_platformLayerProxy->scheduleUpdateOnCompositorThread([this] { this->pushTextureToCompositor(); }))
return;
m_drawCondition.wait(m_drawMutex);
@@ -687,11 +691,14 @@
void MediaPlayerPrivateGStreamerBase::cancelRepaint()
{
+ LockHolder locker(m_drawMutex);
+
if (!m_renderingCanBeAccelerated) {
m_drawTimer.stop();
- LockHolder locker(m_drawMutex);
- m_drawCondition.notifyOne();
}
+
+ m_drawCancelled = true;
+ m_drawCondition.notifyOne();
}
void MediaPlayerPrivateGStreamerBase::repaintCancelledCallback(MediaPlayerPrivateGStreamerBase* player)
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h (227513 => 227514)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h 2018-01-24 10:03:25 UTC (rev 227513)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h 2018-01-24 11:05:37 UTC (rev 227514)
@@ -205,6 +205,7 @@
Condition m_drawCondition;
Lock m_drawMutex;
+ bool m_drawCancelled { false };
RunLoop::Timer<MediaPlayerPrivateGStreamerBase> m_drawTimer;
#if USE(TEXTURE_MAPPER_GL)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes