Make samples disposable

This commit is contained in:
Vanilagy
2025-09-24 21:41:52 +02:00
parent fa4e064345
commit a043f410fd
4 changed files with 25 additions and 8 deletions
+3 -5
View File
@@ -8,10 +8,12 @@
import { Demuxer } from './demuxer';
import { InputFormat } from './input-format';
import { assert } from './misc';
import { assert, polyfillSymbolDispose } from './misc';
import { Reader } from './reader';
import { Source } from './source';
polyfillSymbolDispose();
/**
* The options for creating an Input object.
* @group Input files & tracks
@@ -24,10 +26,6 @@ export type InputOptions<S extends Source = Source> = {
source: S;
};
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html
// @ts-expect-error Readonly
Symbol.dispose ??= Symbol('Symbol.dispose');
/**
* Represents an input media file. This is the root object from which all media read operations start.
* @group Input files & tracks