Title: [248256] releases/WebKitGTK/webkit-2.24
- Revision
- 248256
- Author
- [email protected]
- Date
- 2019-08-03 20:24:14 -0700 (Sat, 03 Aug 2019)
Log Message
Merge r247778 - [GStreamer] Don't crash with empty video src
https://bugs.webkit.org/show_bug.cgi?id=200081
LayoutTests/imported/w3c:
Reviewed by Philippe Normand.
* web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html: Added.
Source/WebCore:
When a <video> element is set to load empty or about:blank, a player is still
created, but no pipeline is loaded. This patch fixes some assertion errors that
manifested in that case.
Reviewed by Philippe Normand.
Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
(WebCore::MediaPlayerPrivateGStreamer::paused const):
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/ChangeLog (248255 => 248256)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/ChangeLog 2019-08-04 03:24:10 UTC (rev 248255)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/ChangeLog 2019-08-04 03:24:14 UTC (rev 248256)
@@ -1,3 +1,12 @@
+2019-07-24 Alicia Boya García <[email protected]>
+
+ [GStreamer] Don't crash with empty video src
+ https://bugs.webkit.org/show_bug.cgi?id=200081
+
+ Reviewed by Philippe Normand.
+
+ * web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html: Added.
+
2019-03-19 Ryosuke Niwa <[email protected]>
appendChild should throw when inserting an ancestor of a template into its content adopted to another document
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html (0 => 248256)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html 2019-08-04 03:24:14 UTC (rev 248256)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>HTML5 Media Elements: An empty src should not crash the player.</title>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+ <link rel="author" title="Alicia Boya García" href=""
+ <script src=""
+ <script src=""
+</head>
+<body>
+<script>
+ function makeCrashTest(src) {
+ async_test(function (test) {
+ const video = document.createElement("video");
+ video.src = ""
+ video.controls = true;
+ document.body.appendChild(video);
+ test.step_timeout(test.step_func(() => {
+ document.body.removeChild(video);
+ test.done();
+ }), 0);
+ }, `src="" does not crash.`);
+ }
+
+ makeCrashTest("about:blank");
+ makeCrashTest("");
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (248255 => 248256)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-08-04 03:24:10 UTC (rev 248255)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-08-04 03:24:14 UTC (rev 248256)
@@ -1,3 +1,21 @@
+2019-07-24 Alicia Boya García <[email protected]>
+
+ [GStreamer] Don't crash with empty video src
+ https://bugs.webkit.org/show_bug.cgi?id=200081
+
+ When a <video> element is set to load empty or about:blank, a player is still
+ created, but no pipeline is loaded. This patch fixes some assertion errors that
+ manifested in that case.
+
+ Reviewed by Philippe Normand.
+
+ Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::loadFull):
+ (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
+ (WebCore::MediaPlayerPrivateGStreamer::paused const):
+
2019-07-19 Charlie Turner <[email protected]>
[GStreamer] Flush get_range calls during PAUSED->READY in WebKitWebSource
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (248255 => 248256)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-08-04 03:24:10 UTC (rev 248255)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-08-04 03:24:14 UTC (rev 248256)
@@ -281,8 +281,10 @@
}
URL url(URL(), urlString);
- if (url.protocolIsAbout())
+ if (url.protocolIsAbout()) {
+ loadingFailed(MediaPlayer::FormatError, MediaPlayer::HaveNothing, true);
return;
+ }
if (!m_pipeline)
createGSTPlayBin(url, pipelineName);
@@ -487,6 +489,9 @@
MediaTime MediaPlayerPrivateGStreamer::platformDuration() const
{
+ if (!m_pipeline)
+ return MediaTime::invalidTime();
+
GST_TRACE_OBJECT(pipeline(), "errorOccured: %s, pipeline state: %s", boolForPrinting(m_errorOccured), gst_element_state_get_name(GST_STATE(m_pipeline.get())));
if (m_errorOccured)
return MediaTime::invalidTime();
@@ -655,6 +660,9 @@
bool MediaPlayerPrivateGStreamer::paused() const
{
+ if (!m_pipeline)
+ return true;
+
if (m_isEndReached) {
GST_DEBUG_OBJECT(pipeline(), "Ignoring pause at EOS");
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes