mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
optimize send nack when check packet lost send nack immediately
This commit is contained in:
@@ -2,13 +2,6 @@
|
||||
|
||||
namespace SRT {
|
||||
|
||||
#define MAX_SEQ 0x7fffffff
|
||||
#define MAX_TS 0xffffffff
|
||||
|
||||
static inline uint32_t genExpectedSeq(uint32_t seq) {
|
||||
return MAX_SEQ & seq;
|
||||
}
|
||||
|
||||
static inline bool isSeqEdge(uint32_t seq, uint32_t cap) {
|
||||
if (seq > (MAX_SEQ - cap)) {
|
||||
return true;
|
||||
@@ -160,9 +153,9 @@ std::list<PacketQueue::LostPair> PacketQueue::getLostSeq() {
|
||||
if (finish) {
|
||||
finish = false;
|
||||
lost.first = i;
|
||||
lost.second = i + 1;
|
||||
lost.second = genExpectedSeq(i + 1);
|
||||
} else {
|
||||
lost.second = i + 1;
|
||||
lost.second = genExpectedSeq(i + 1);
|
||||
}
|
||||
} else {
|
||||
if (!finish) {
|
||||
|
||||
Reference in New Issue
Block a user