mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 04:22:00 -08:00
decrease ram consumption
This commit is contained in:
parent
a8ec4a4cf6
commit
b526330607
3 changed files with 5 additions and 5 deletions
|
|
@ -1162,7 +1162,7 @@ func (c *client) runRecordUDP() {
|
|||
|
||||
func (c *client) runRecordTCP() {
|
||||
frame := &gortsplib.InterleavedFrame{}
|
||||
readBuf := newMultiBuffer(3, clientTCPReadBufferSize)
|
||||
readBuf := newMultiBuffer(2, clientTCPReadBufferSize)
|
||||
|
||||
readRequest := make(chan readRequestPair)
|
||||
defer close(readRequest)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func newServerUDP(p *program, port int, streamType gortsplib.StreamType) (*serve
|
|||
p: p,
|
||||
pc: pc,
|
||||
streamType: streamType,
|
||||
readBuf: newMultiBuffer(3, clientUDPReadBufferSize),
|
||||
readBuf: newMultiBuffer(2, clientUDPReadBufferSize),
|
||||
writec: make(chan udpBufAddrPair),
|
||||
done: make(chan struct{}),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ func (s *source) runUDP(conn *gortsplib.ConnClient) bool {
|
|||
go func(trackId int, rtpRead gortsplib.UDPReadFunc) {
|
||||
defer wg.Done()
|
||||
|
||||
multiBuf := newMultiBuffer(3, sourceUDPReadBufferSize)
|
||||
multiBuf := newMultiBuffer(2, sourceUDPReadBufferSize)
|
||||
for {
|
||||
buf := multiBuf.next()
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ func (s *source) runUDP(conn *gortsplib.ConnClient) bool {
|
|||
go func(trackId int, rtcpRead gortsplib.UDPReadFunc) {
|
||||
defer wg.Done()
|
||||
|
||||
multiBuf := newMultiBuffer(3, sourceUDPReadBufferSize)
|
||||
multiBuf := newMultiBuffer(2, sourceUDPReadBufferSize)
|
||||
for {
|
||||
buf := multiBuf.next()
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ func (s *source) runTCP(conn *gortsplib.ConnClient) bool {
|
|||
s.p.sourceReady <- s
|
||||
|
||||
frame := &gortsplib.InterleavedFrame{}
|
||||
multiBuf := newMultiBuffer(3, sourceTCPReadBufferSize)
|
||||
multiBuf := newMultiBuffer(2, sourceTCPReadBufferSize)
|
||||
|
||||
tcpConnDone := make(chan error)
|
||||
go func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue