修复接收rtsp、gb28181等rtp流转为其他协议播放时可能卡顿的bug (#1906)

* 修复获取ntp_stamp时计算溢出的bug
This commit is contained in:
rqb500 2022-08-26 11:42:40 +08:00 committed by GitHub
parent 44ba971cb6
commit 00acea369e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ uint64_t RtcpSR::getNtpUnixStampMS() const {
struct timeval tv;
tv.tv_sec = ntpmsw - 0x83AA7E80;
tv.tv_usec = (decltype(tv.tv_usec))(ntplsw / ((double)(((uint64_t)1) << 32) * 1.0e-6));
return 1000 * tv.tv_sec + tv.tv_usec / 1000;
return (uint64_t)1000 * tv.tv_sec + tv.tv_usec / 1000;
}
void RtcpSR::setNtpStamp(struct timeval tv) {