-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GStreamer] Prevent a crash when fetching data on stopped MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=260649 rdar://problem/114370120 Reviewed by Xabier Rodriguez-Calvar. The backend (GStreamer transcoder) is now clearly separated from the MediaRecorderPrivate, so that fetchData() can create a weak pointer to be used from the main thread. If the backend was destroyed in-flight no unsafe memory access is performed. Test: http/wpt/mediarecorder/MediaRecorder-start-stop-crash.html Canonical link: https://commits.webkit.org/267345@main
- Loading branch information
Showing
5 changed files
with
224 additions
and
61 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
LayoutTests/http/wpt/mediarecorder/MediaRecorder-start-stop-crash.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,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Starting and stopping a MediaRecorder should trigger no crash</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
promise_test(async (t) => { | ||
const audioContext = new AudioContext(); | ||
const destination = audioContext.createMediaStreamDestination(); | ||
const recorder = new MediaRecorder(destination.stream); | ||
|
||
recorder.start(); | ||
recorder.stop(); | ||
}, "Starting and stopping a MediaRecorder should trigger no crash"); | ||
</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
Oops, something went wrong.