mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
Add workaround for https://issues.chromium.org/issues/529852980
This commit is contained in:
+6
-2
@@ -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();
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user