web/webcodecs: close frames after we're done using them
This commit is contained in:
parent
cd761c7b7d
commit
6b80ea99a6
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue