diff --git a/tests/test.h264.js b/tests/test.h264.js index 438470fed..ca550e4de 100644 --- a/tests/test.h264.js +++ b/tests/test.h264.js @@ -78,10 +78,11 @@ async function haveH264Decode() { 'NjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFx' + 'PTE6MS4wMACAAAABZYiEBrxmKAAPVccAAS044AA5DRJMnkycJk4TPw==')); + let gotframe = false; let error = null; let decoder = new VideoDecoder({ - output: frame => {}, + output: frame => { gotframe = true; }, error: e => { console.log("error");error = e; }, }); let chunk = new EncodedVideoChunk({ @@ -101,7 +102,17 @@ async function haveH264Decode() { error = e; } + console.log(gotframe); console.log(error); + + // Firefox fails to deliver the error on Windows, so we need to + // check if we got a frame instead + // https://bugzilla.mozilla.org/show_bug.cgi?id=1932392 + if (!gotframe) { + _haveH264Decode = false; + return _haveH264Decode; + } + _haveH264Decode = error === null; return _haveH264Decode;