mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 21:33:52 +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();
|
firstSample.close();
|
||||||
await tempOutput.finalize();
|
await tempOutput.finalize();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logging._info('Error when probing encoder support. Falling back to rerender path.', error);
|
Logging._warn(
|
||||||
needsRerender = true;
|
'An error occurred when probing encoder support. Falling back to rerender path.', error,
|
||||||
|
);
|
||||||
void tempOutput.cancel();
|
void tempOutput.cancel();
|
||||||
|
|
||||||
|
needsRerender = true;
|
||||||
|
encodingConfig.transform.force = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await tempOutput.cancel();
|
await tempOutput.cancel();
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import {
|
|||||||
setUint24,
|
setUint24,
|
||||||
toUint8Array,
|
toUint8Array,
|
||||||
UnthrottledTimerHandle,
|
UnthrottledTimerHandle,
|
||||||
|
wait,
|
||||||
} from './misc';
|
} from './misc';
|
||||||
import { Muxer } from './muxer';
|
import { Muxer } from './muxer';
|
||||||
import { SubtitleParser } from './subtitles';
|
import { SubtitleParser } from './subtitles';
|
||||||
@@ -878,6 +879,9 @@ class VideoEncoderWrapper {
|
|||||||
// These are wired in series, therefore they must also be flushed in series
|
// These are wired in series, therefore they must also be flushed in series
|
||||||
await this.encoder.flush();
|
await this.encoder.flush();
|
||||||
await this.alphaEncoder?.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') {
|
if (this.encoder.state !== 'closed') {
|
||||||
|
|||||||
Reference in New Issue
Block a user