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:
Raja Subramanian
2022-07-15 11:46:02 +05:30
committed by GitHub
parent a0578db3ed
commit 4c7d3161a9
3 changed files with 9 additions and 7 deletions
+4 -4
View File
@@ -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)