mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Add proper reference count-based source disposal system
This commit is contained in:
@@ -81,6 +81,13 @@ export abstract class SegmentedInput {
|
||||
formats: [new VirtualInputFormat(() => new SegmentedInputDemuxer(this.input, this))],
|
||||
});
|
||||
}
|
||||
|
||||
dispose() {
|
||||
for (const entry of this.inputCache) {
|
||||
entry.input.dispose();
|
||||
}
|
||||
this.inputCache.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
class SegmentedInputDemuxer extends Demuxer {
|
||||
|
||||
Reference in New Issue
Block a user