diff --git a/src/conversion.ts b/src/conversion.ts index 8349fde..9b4aab4 100644 --- a/src/conversion.ts +++ b/src/conversion.ts @@ -1329,9 +1329,13 @@ export class Conversion { firstSample.close(); await tempOutput.finalize(); } catch (error) { - Logging._info('Error when probing encoder support. Falling back to rerender path.', error); - needsRerender = true; + Logging._warn( + 'An error occurred when probing encoder support. Falling back to rerender path.', error, + ); void tempOutput.cancel(); + + needsRerender = true; + encodingConfig.transform.force = true; } } else { await tempOutput.cancel(); diff --git a/src/media-source.ts b/src/media-source.ts index 223a7f7..59167d2 100644 --- a/src/media-source.ts +++ b/src/media-source.ts @@ -36,6 +36,7 @@ import { setUint24, toUint8Array, UnthrottledTimerHandle, + wait, } from './misc'; import { Muxer } from './muxer'; import { SubtitleParser } from './subtitles'; @@ -878,6 +879,9 @@ class VideoEncoderWrapper { // These are wired in series, therefore they must also be flushed in series await this.encoder.flush(); await this.alphaEncoder?.flush(); + + // Workaround for https://issues.chromium.org/issues/529852980 to give it time for errors to surface + await wait(25); } if (this.encoder.state !== 'closed') {