Skip to content

Commit

Permalink
wait frame
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Nov 21, 2024
1 parent 8b052fc commit 428d523
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test.h264.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; },

Check failure on line 85 in tests/test.h264.js

View workflow job for this annotation

GitHub Actions / eslint

Expected parentheses around arrow function argument having a body with curly braces
error: e => { console.log("error");error = e; },

Check failure on line 86 in tests/test.h264.js

View workflow job for this annotation

GitHub Actions / eslint

Expected parentheses around arrow function argument having a body with curly braces

Check failure on line 86 in tests/test.h264.js

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
});
let chunk = new EncodedVideoChunk({
Expand All @@ -101,7 +102,17 @@ async function haveH264Decode() {
error = e;
}

console.log(gotframe);

Check failure on line 105 in tests/test.h264.js

View workflow job for this annotation

GitHub Actions / eslint

Unexpected console statement
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;
Expand Down

0 comments on commit 428d523

Please sign in to comment.