修复rtp无实际负载时判定为丢包的bug (#4563)
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows / build (push) Waiting to run

RTP无负载时,也记录序号
This commit is contained in:
JanffuChan 2025-11-25 19:00:38 +08:00 committed by GitHub
parent 7b2bd221ea
commit 5efe843595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;
}
}