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

-6
View File
@@ -3,7 +3,6 @@ package download
import (
"context"
"io"
"path/filepath"
"strings"
"sync"
@@ -127,12 +126,7 @@ func (d *Downloader) newExtensionEngine() (*engine.Engine, *engineSession) {
}{UserAgent: httpProtocol.DefaultUserAgent}
d.getProtocolConfig("http", &httpConfig)
userAgent := strings.TrimSpace(httpConfig.UserAgent)
tempDir := ""
if d.cfg.StorageDir != "" {
tempDir = filepath.Join(d.cfg.StorageDir, "temp", "ffmpeg")
}
e := engine.NewEngine(&engine.Config{
TempDir: tempDir,
HTTPUserAgent: &userAgent,
ProxyConfig: d.cfg.Proxy,
StreamConfig: engineCfg,