diff --git a/web/src/lib/libav/webcodecs.ts b/web/src/lib/libav/webcodecs.ts index ddb9ec82..e9d5e958 100644 --- a/web/src/lib/libav/webcodecs.ts +++ b/web/src/lib/libav/webcodecs.ts @@ -241,7 +241,8 @@ export default class WebCodecsWrapper { } } - return destination.encode(data); + destination.encode(data); + data.close(); } static encodeVideo(data: VideoFrame | LibAVPolyfill.VideoFrame, destination: VideoEncoder) { @@ -260,6 +261,7 @@ export default class WebCodecsWrapper { } } - return destination.encode(data as VideoFrame); + destination.encode(data as VideoFrame); + data.close(); } } \ No newline at end of file