mirror of https://bitbucket.org/ausocean/av.git
revid/senders.go: increase buffer pool maxAlloc in mtsSender
This commit is contained in:
parent
67e03d0f5c
commit
300c5bc14d
|
@ -49,9 +49,10 @@ import (
|
|||
|
||||
// Sender pool buffer read timeouts.
|
||||
const (
|
||||
rtmpPoolReadTimeout = 1 * time.Second
|
||||
mtsPoolReadTimeout = 1 * time.Second
|
||||
maxBuffLen = 50000000
|
||||
rtmpPoolReadTimeout = 1 * time.Second
|
||||
mtsPoolReadTimeout = 1 * time.Second
|
||||
mtsBufferPoolMaxAlloc = 5 << 20 // 5MiB.
|
||||
maxBuffLen = 50000000
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -228,6 +229,9 @@ func newMTSSender(dst io.WriteCloser, log logging.Logger, rb *pool.Buffer, clipD
|
|||
done: make(chan struct{}),
|
||||
clipDur: clipDur,
|
||||
}
|
||||
// mtsSender will do particularly large writes to the pool buffer; let's
|
||||
// increase its max allowable allocation.
|
||||
pool.MaxAlloc(mtsBufferPoolMaxAlloc)
|
||||
s.wg.Add(1)
|
||||
go s.output()
|
||||
return s
|
||||
|
|
Loading…
Reference in New Issue