mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 11:32:08 +08:00
fix overriding of previously-received RTP packets that leaded to crashes
RTP packets were previously take from a buffer pool. This was messing up the Client, since that buffer pool was used by multiple routines at once, and was probably messing up the Server too, since packets can be pushed to different queues and there's no guarantee that these queues have an overall size less than ReadBufferCount. This buffer pool is removed; this decreases performance but avoids bugs.
This commit is contained in:
@@ -236,7 +236,6 @@ type Client struct {
|
||||
medias map[*media.Media]*clientMedia
|
||||
tcpMediasByChannel map[int]*clientMedia
|
||||
lastRange *headers.Range
|
||||
rtpPacketBuffer *rtpPacketMultiBuffer // play
|
||||
checkStreamTimer *time.Timer
|
||||
checkStreamInitial bool
|
||||
tcpLastFrameTime *int64
|
||||
@@ -630,7 +629,6 @@ func (c *Client) playRecordStart() {
|
||||
|
||||
if c.state == clientStatePlay {
|
||||
c.keepaliveTimer = time.NewTimer(c.keepalivePeriod)
|
||||
c.rtpPacketBuffer = newRTPPacketMultiBuffer(uint64(c.ReadBufferCount))
|
||||
|
||||
switch *c.effectiveTransport {
|
||||
case TransportUDP:
|
||||
|
Reference in New Issue
Block a user