mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-29 22:32:23 +08:00
修复webrtc rtp重发列队可能由于rtp时间戳异常导致内存溢出的bug
This commit is contained in:
@@ -22,24 +22,11 @@ namespace mediakit {
|
||||
|
||||
// RTC配置项目
|
||||
namespace Rtc {
|
||||
|
||||
//~ nack接收端(rtp发送端)
|
||||
// Nack缓存包最早时间间隔
|
||||
extern const std::string kMaxNackMS;
|
||||
// Nack包检查间隔(包数量)
|
||||
extern const std::string kRtpCacheCheckInterval;
|
||||
|
||||
//~ nack发送端(rtp接收端)
|
||||
//~ nack发送端,rtp接收端
|
||||
// 最大保留的rtp丢包状态个数
|
||||
extern const std::string kNackMaxSize;
|
||||
// rtp丢包状态最长保留时间
|
||||
extern const std::string kNackMaxMS;
|
||||
// nack最多请求重传次数
|
||||
extern const std::string kNackMaxCount;
|
||||
// nack重传频率,rtt的倍数
|
||||
extern const std::string kNackIntervalRatio;
|
||||
// nack包中rtp个数,减小此值可以让nack包响应更灵敏
|
||||
extern const std::string kNackRtpSize;
|
||||
} // namespace Rtc
|
||||
|
||||
class NackList {
|
||||
@@ -50,7 +37,7 @@ public:
|
||||
private:
|
||||
void popFront();
|
||||
uint32_t getCacheMS();
|
||||
int64_t getRtpStamp(uint16_t seq);
|
||||
int64_t getNtpStamp(uint16_t seq);
|
||||
RtpPacket::Ptr *getRtp(uint16_t seq);
|
||||
|
||||
private:
|
||||
@@ -88,7 +75,7 @@ private:
|
||||
struct NackStatus {
|
||||
uint64_t first_stamp;
|
||||
uint64_t update_stamp;
|
||||
int nack_count = 0;
|
||||
uint32_t nack_count = 0;
|
||||
};
|
||||
std::map<uint16_t /*seq*/, NackStatus> _nack_send_status;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user