Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed May 11, 2024
1 parent 29aa87d commit e800bea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ts/Renderer/WebCodecsRendererCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class WebCodecsRendererCache
type: VideoStreamType.VideoStreamHigh,
encodedFrameOnly: true,
});
this._engine?.getMediaEngine().registerVideoEncodedFrameObserver(this);
}

public shouldFallback(frameInfo: EncodedVideoFrameInfo): boolean {
Expand Down Expand Up @@ -104,6 +105,7 @@ export class WebCodecsRendererCache

public release(): void {
logInfo('call_back_with_encoded_video_frame release');
this._engine?.getMediaEngine().unregisterVideoEncodedFrameObserver(this);
this._decoder?.release();
this._decoder = null;
super.release();
Expand Down

0 comments on commit e800bea

Please sign in to comment.