Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Dec 18, 2024
1 parent 70ae97f commit bc74ae7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ts/Renderer/WebCodecsRenderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export class WebCodecsRenderer extends IRenderer {

drawFrame(frame: any, _codecConfig: CodecConfigInfo) {
if (!this.offscreenCanvas || !frame) return;

this.offscreenCanvas.width = _codecConfig.codedWidth!;
this.offscreenCanvas.height = _codecConfig.codedHeight!;

this.updateRenderMode();
this.rotateCanvas({
rotation: _codecConfig.rotation,
Expand Down

0 comments on commit bc74ae7

Please sign in to comment.