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

-3
View File
@@ -160,8 +160,6 @@ 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
@@ -209,7 +207,6 @@ 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,