fix(stream): bound FFmpeg memory buffers and propagate Blob backpressure

This commit is contained in:
Levi committed 2026-09-13 18:24:32 +08:00
1 parent 637004c8a8
commit 5d83e91ce5
10 files changed
+142 -125

No files matched your search

+1 -2
View File
@@ -22,7 +22,6 @@ import (
var script string
type Config struct {
TempDir string
DefaultUserAgent *string
ProxyHandler func(*http.Request) (*url.URL, error)
RegisterCleanup func(func())
@@ -123,7 +122,7 @@ func Enable(vm *goja.Runtime, loop *eventloop.EventLoop, cfg *Config) error {
j := &job{ctx: ctx, cancel: cancel, output: r}
for i, source := range []*media.HTTPSource{opts.Video, opts.Audio} {
if source == nil {
j.streams[i] = media.NewStreamInput(ctx, cfg.TempDir)
j.streams[i] = media.NewStreamInput(ctx)
}
}
id := fmt.Sprintf("ffmpeg-%d", next.Add(1))