1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: For NACK, it sequence must match exactly, or it cause SRTP fail

This commit is contained in:
winlin 2020-08-10 15:06:08 +08:00
parent 49bb418e74
commit 6bc316016b
2 changed files with 51 additions and 3 deletions

View file

@ -1796,11 +1796,19 @@ bool SrsRtcSendTrack::has_ssrc(uint32_t ssrc)
SrsRtpPacket2* SrsRtcSendTrack::fetch_rtp_packet(uint16_t seq)
{
if (rtp_queue_) {
return rtp_queue_->at(seq);
SrsRtpPacket2* pkt = rtp_queue_->at(seq);
if (pkt == NULL) {
return pkt;
}
return NULL;
// For NACK, it sequence must match exactly, or it cause SRTP fail.
if (pkt->header.get_sequence() != seq) {
srs_trace("miss match seq=%u, pkt seq=%u", seq, pkt->header.get_sequence());
return NULL;
}
return pkt;
}
// TODO: FIXME: Should refine logs, set tracks in a time.