mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-12 19:33:41 +00:00
fix(ffmpeg): use app-writable temporary directory for stream buffers
This commit is contained in:
1 parent
9124976b5c
commit
637004c8a8
6 files changed
+61
-8
No files matched your search
@@ -22,6 +22,7 @@ import (
|
||||
var script string
|
||||
|
||||
type Config struct {
|
||||
TempDir string
|
||||
DefaultUserAgent *string
|
||||
ProxyHandler func(*http.Request) (*url.URL, error)
|
||||
RegisterCleanup func(func())
|
||||
@@ -122,7 +123,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)
|
||||
j.streams[i] = media.NewStreamInput(ctx, cfg.TempDir)
|
||||
}
|
||||
}
|
||||
id := fmt.Sprintf("ffmpeg-%d", next.Add(1))
|
||||
|
||||
Reference in new issue
Block a user