handle edge-case scenario of RTP packet sequence overrun;

pull/1/head
Bryan Biedenkapp 2 years ago
parent d0d3256ac3
commit ff5d4cf1c8

@ -140,6 +140,8 @@ namespace fnecore
public const ushort RtpFNEHeaderExtLength = 4; // length of FNE header in 32-bit units
public const uint RtpGenericClockRate = 8000;
public const ushort RtpCallEndSeq = 65535;
public const byte DVMRtpPayloadType = 0x56;
public const byte DVMFrameStart = 0xFE;

@ -271,7 +271,7 @@ namespace fnecore
ushort curr = currPktSeq;
++currPktSeq;
if (currPktSeq > ushort.MaxValue)
if (currPktSeq > (Constants.RtpCallEndSeq - 1))
currPktSeq = 0;
return curr;

Loading…
Cancel
Save

Powered by TurnKey Linux.