web/webcodecs: close frames after we're done using them

This commit is contained in:
dumbmoron 2024-09-03 17:56:28 +00:00
parent cd761c7b7d
commit 6b80ea99a6
No known key found for this signature in database

View file

@ -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();
}
}