Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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):
- Loading branch information
1 parent
e24680b
commit 4b0dfe3
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...atform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="mailto:aboya@igalia.com"/> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
function makeCrashTest(src) { | ||
async_test(function (test) { | ||
const video = document.createElement("video"); | ||
video.src = src; | ||
video.controls = true; | ||
document.body.appendChild(video); | ||
test.step_timeout(test.step_func(() => { | ||
document.body.removeChild(video); | ||
test.done(); | ||
}), 0); | ||
}, `src="${src}" does not crash.`); | ||
} | ||
|
||
makeCrashTest("about:blank"); | ||
makeCrashTest(""); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters