Handle exceptions from VideoDecoder.flush()
These are not supposed to happen according to the specification, but Firefox has some bug and throws them anyway.
This commit is contained in:
parent
3677afe305
commit
a89dfd6141
|
@ -127,7 +127,13 @@ async function _checkWebCodecsH264DecodeSupport() {
|
|||
|
||||
decoder.configure(config);
|
||||
decoder.decode(chunk);
|
||||
await decoder.flush();
|
||||
try {
|
||||
await decoder.flush();
|
||||
} catch (e) {
|
||||
// Firefox incorrectly throws an exception here
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1932566
|
||||
error = e;
|
||||
}
|
||||
|
||||
if (error !== null) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue