修复rtp pts 时间戳回退导致ntp时间戳计算异常的bug:#1152

This commit is contained in:
ziyue
2021-10-13 15:52:12 +08:00
parent 2ec3b0ccea
commit dd81497e5c
2 changed files with 2 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ RtpPacket::Ptr RtpTrack::inputRtp(TrackType type, int sample_rate, uint8_t *ptr,
rtp->ntp_stamp = rtp->getStamp() * uint64_t(1000) / sample_rate;
} else {
//设置ntp时间戳
rtp->ntp_stamp = _ntp_stamp.getNtpStamp(ntohl(rtp->getHeader()->stamp), sample_rate);
rtp->ntp_stamp = _ntp_stamp.getNtpStamp(rtp->getStamp(), sample_rate);
}
onBeforeRtpSorted(rtp);
sortPacket(rtp->getSeq(), rtp);