mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-07 17:10:29 +00:00
fix(stream): bound FFmpeg memory buffers and propagate Blob backpressure
This commit is contained in:
1 parent
637004c8a8
commit
5d83e91ce5
10 files changed
+142
-125
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user