mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-13 20:03:46 +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
@@ -160,6 +160,8 @@ func (e *Engine) addCleanup(cleanup func()) {
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
// TempDir supplies an app-writable directory for FFmpeg stream buffers.
|
||||
TempDir string
|
||||
// HTTPUserAgent is a snapshot of the downloader HTTP default. Nil leaves standalone engines unchanged.
|
||||
HTTPUserAgent *string
|
||||
ProxyConfig *base.DownloaderProxyConfig
|
||||
@@ -207,6 +209,7 @@ func NewEngine(cfg *Config) *Engine {
|
||||
return
|
||||
}
|
||||
if err := ffmpegapi.Enable(runtime, loop, &ffmpegapi.Config{
|
||||
TempDir: cfg.TempDir,
|
||||
ProxyHandler: cfg.ProxyConfig.ToHandler(),
|
||||
DefaultUserAgent: cfg.HTTPUserAgent,
|
||||
RegisterCleanup: engine.addCleanup,
|
||||
|
||||
Reference in new issue
Block a user