From cf1adf1c92e003d232a31a9f36808ff6f48725f9 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 20 Oct 2021 10:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E4=B8=80=E4=BA=9B=E4=B8=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E7=9A=84rtsp=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Stamp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Common/Stamp.cpp b/src/Common/Stamp.cpp index 2129bd63..d0b18d87 100644 --- a/src/Common/Stamp.cpp +++ b/src/Common/Stamp.cpp @@ -223,6 +223,10 @@ void NtpStamp::setNtpStamp(uint32_t rtp_stamp, uint64_t ntp_stamp_ms) { } void NtpStamp::update(uint32_t rtp_stamp, uint64_t ntp_stamp_ms) { + if (ntp_stamp_ms == 0) { + //实测发现有些rtsp服务器发送的rtp时间戳和ntp时间戳一直为0 + return; + } _last_rtp_stamp = rtp_stamp; _last_ntp_stamp_ms = ntp_stamp_ms; }