Title: [253284] trunk/Source/WebCore
- Revision
- 253284
- Author
- [email protected]
- Date
- 2019-12-09 01:18:12 -0800 (Mon, 09 Dec 2019)
Log Message
[GStreamer] Crashes in MediaPlayerPrivateGStreamer::ensureGstGLContext
https://bugs.webkit.org/show_bug.cgi?id=204848
Reviewed by Michael Catanzaro.
Make sure the GL video sink uses a valid WebKit shared GL context.
* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(ensureGstGLContext):
(webKitGLVideoSinkProbePlatform):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253283 => 253284)
--- trunk/Source/WebCore/ChangeLog 2019-12-09 08:17:37 UTC (rev 253283)
+++ trunk/Source/WebCore/ChangeLog 2019-12-09 09:18:12 UTC (rev 253284)
@@ -1,3 +1,16 @@
+2019-12-09 Philippe Normand <[email protected]>
+
+ [GStreamer] Crashes in MediaPlayerPrivateGStreamer::ensureGstGLContext
+ https://bugs.webkit.org/show_bug.cgi?id=204848
+
+ Reviewed by Michael Catanzaro.
+
+ Make sure the GL video sink uses a valid WebKit shared GL context.
+
+ * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
+ (ensureGstGLContext):
+ (webKitGLVideoSinkProbePlatform):
+
2019-12-09 Wenson Hsieh <[email protected]>
Add encoding and decoding support for more DisplayListItems
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp (253283 => 253284)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp 2019-12-09 08:17:37 UTC (rev 253283)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp 2019-12-09 09:18:12 UTC (rev 253284)
@@ -190,6 +190,12 @@
}
GLContext* sharedContext = sharedDisplay.sharingGLContext();
+ if (!sharedContext) {
+ GST_ELEMENT_ERROR(GST_ELEMENT_CAST(sink), RESOURCE, NOT_FOUND, (("WebKit shared GL context unavailable")),
+ ("The WebKit shared GL context somehow disappeared. Video textures rendering will fail."));
+ return false;
+ }
+
// EGL and GLX are mutually exclusive, no need for ifdefs here.
GstGLPlatform glPlatform = sharedContext->isEGLContext() ? GST_GL_PLATFORM_EGL : GST_GL_PLATFORM_GLX;
@@ -341,6 +347,13 @@
bool webKitGLVideoSinkProbePlatform()
{
+ auto& sharedDisplay = PlatformDisplay::sharedDisplayForCompositing();
+ GLContext* sharedContext = sharedDisplay.sharingGLContext();
+ if (!sharedContext) {
+ GST_WARNING("WebKit shared GL context is not available.");
+ return false;
+ }
+
return isGStreamerPluginAvailable("app") && isGStreamerPluginAvailable("opengl");
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes