Files
sousa-gecko/dom/media/webcodecs/crashtests/2021184.html
T
Paul Adenot 7171193d1f Bug 2021184 - Fix on-the-fly reconfiguration in FFmpeg and AppleVT encoders r=media-playback-reviewers,jolin
ProcessReconfigure initialized ok to false, causing on-the-fly reconfiguration
to always fail and drain+recreate the encoder unnecessarily.

Additionally, BitrateChange carries a Maybe<uint32_t>. Reconfiguring from a
config with an explicit bitrate to one without produces BitrateChange{Nothing()},
which hit an unchecked .ref() in FFmpegDataEncoder. While this looks strange, it
means: "revert the decoder to picking the bitrate it wants", e.g based on
resolution/framerate or whatever the encoder's policy is.

Differential Revision: https://phabricator.services.mozilla.com/D286672
2026-03-13 18:37:45 +00:00

32 lines
578 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<body>
<script>
async function run() {
if (typeof VideoEncoder === "undefined") {
return;
}
const encoder = new VideoEncoder({ output: () => {}, error: () => {} });
encoder.configure({
codec: "avc1.42001E",
width: 640,
height: 480,
avc: {},
bitrate: 1000000
});
encoder.configure({
codec: "avc1.42001E",
width: 320,
height: 240,
avc: {}
});
await encoder.flush().catch(() => {});
}
run().finally(() => {
document.documentElement.className = "";
});
</script>
</body>
</html>