From 877af1b62b397d0a29575ff35ab8f4eec0958ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E9=B8=A3?= <94030128+ixingqiao@users.noreply.github.com> Date: Thu, 1 Jun 2023 14:09:50 +0800 Subject: [PATCH] Update Stamp.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决rtsp拉流,ntp时间戳计算累积误差的问题 --- src/Common/Stamp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Stamp.h b/src/Common/Stamp.h index cc2dcae0..f086c2a8 100644 --- a/src/Common/Stamp.h +++ b/src/Common/Stamp.h @@ -125,12 +125,12 @@ public: uint64_t getNtpStamp(uint32_t rtp_stamp, uint32_t sample_rate); private: - void update(uint32_t rtp_stamp, uint64_t ntp_stamp_ms); + void update(uint32_t rtp_stamp, double ntp_stamp_ms); uint64_t getNtpStamp_l(uint32_t rtp_stamp, uint32_t sample_rate); private: uint32_t _last_rtp_stamp = 0; - uint64_t _last_ntp_stamp_ms = 0; + double _last_ntp_stamp_ms = 0; }; }//namespace mediakit