diff --git a/Constants.cs b/Constants.cs index 9aab7e4..57bdffa 100644 --- a/Constants.cs +++ b/Constants.cs @@ -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; diff --git a/FnePeer.cs b/FnePeer.cs index 24fa437..9863230 100644 --- a/FnePeer.cs +++ b/FnePeer.cs @@ -271,7 +271,7 @@ namespace fnecore ushort curr = currPktSeq; ++currPktSeq; - if (currPktSeq > ushort.MaxValue) + if (currPktSeq > (Constants.RtpCallEndSeq - 1)) currPktSeq = 0; return curr;