Record dynacast requirement of a subscriber synchronously. (#834)
With rapid changes to subscription settings, use of a goroutine could end up processing dynacast needs for that subscriber in a different order. So, record the susbcription needs of a subscriber in the callback and process the data in a go routine.
This commit is contained in:
@@ -259,10 +259,6 @@ func (r *RTPStats) Update(rtph *rtp.Header, payloadSize int, paddingSize int, pa
|
||||
r.highestSN = rtph.SequenceNumber
|
||||
r.highestTS = rtph.Timestamp
|
||||
r.highestTime = packetTime
|
||||
|
||||
if rtph.Marker {
|
||||
r.frames++
|
||||
}
|
||||
}
|
||||
|
||||
if !isDuplicate {
|
||||
@@ -271,6 +267,10 @@ func (r *RTPStats) Update(rtph *rtp.Header, payloadSize int, paddingSize int, pa
|
||||
r.bytesPadding += pktSize
|
||||
} else {
|
||||
r.bytes += pktSize
|
||||
|
||||
if rtph.Marker {
|
||||
r.frames++
|
||||
}
|
||||
}
|
||||
|
||||
r.updateJitter(rtph, packetTime)
|
||||
|
||||
Reference in New Issue
Block a user