expose number of lost packets without passing through an error (#735)

This commit is contained in:
Alessandro Ros
2025-03-24 16:39:55 +01:00
committed by GitHub
parent 1b127d70bb
commit c0c275e6a6
13 changed files with 68 additions and 28 deletions

View File

@@ -27,7 +27,7 @@ func (r *Reorderer) Initialize() {
// Process processes a RTP packet.
// It returns a sequence of ordered packets and the number of lost packets.
func (r *Reorderer) Process(pkt *rtp.Packet) ([]*rtp.Packet, uint) {
func (r *Reorderer) Process(pkt *rtp.Packet) ([]*rtp.Packet, uint64) {
if !r.initialized {
r.initialized = true
r.expectedSeqNum = pkt.SequenceNumber + 1
@@ -86,7 +86,7 @@ func (r *Reorderer) Process(pkt *rtp.Packet) ([]*rtp.Packet, uint) {
ret[pos] = pkt
r.expectedSeqNum = pkt.SequenceNumber + 1
return ret, uint(int(relPos) - n + 1)
return ret, uint64(int(relPos) - n + 1)
}
// there's a missing packet