mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Fix sample closing before it reaches the custom encoder
This commit is contained in:
@@ -123,6 +123,7 @@ const sampleSource = new VideoSampleSource({
|
||||
});
|
||||
|
||||
await sampleSource.add(videoSample);
|
||||
videoSample.close(); // If it's not needed anymore
|
||||
|
||||
// You may optionally force samples to be encoded as key frames:
|
||||
await sampleSource.add(videoSample, { keyFrame: true });
|
||||
@@ -285,6 +286,7 @@ const sampleSource = new AudioSampleSource({
|
||||
});
|
||||
|
||||
await sampleSource.add(audioSample);
|
||||
audioSample.close(); // If it's not needed anymore
|
||||
```
|
||||
|
||||
### `AudioBufferSource`
|
||||
|
||||
Reference in New Issue
Block a user