Add proper reference count-based source disposal system

This commit is contained in:
Vanilagy
2026-03-12 21:29:01 +01:00
parent e8df451bf5
commit c43ca025d9
7 changed files with 144 additions and 48 deletions
+7
View File
@@ -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 {