修复rtp无实际负载时判定为丢包的bug (#4563)

RTP无负载时,也记录序号
This commit is contained in:
JanffuChan
2025-11-25 19:00:38 +08:00
committed by GitHub
parent 7b2bd221ea
commit 5efe843595

View File

@@ -28,6 +28,8 @@ bool CommonRtpDecoder::inputRtp(const RtpPacket::Ptr &rtp, bool){
if (payload_size <= 0) {
// 无实际负载 [AUTO-TRANSLATED:305af48f]
// No actual load
// 无实际负载也需要记录序号,否则会误判丢包
_last_seq = rtp->getSeq();
return false;
}
auto payload = rtp->getPayload();
@@ -93,4 +95,4 @@ bool CommonRtpEncoder::inputFrame(const Frame::Ptr &frame){
is_key = false;
}
return len > 0;
}
}