mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
完善ntp时间戳计算逻辑
This commit is contained in:
@@ -101,10 +101,10 @@ RtpPacket::Ptr RtpTrack::inputRtp(TrackType type, int sample_rate, uint8_t *ptr,
|
||||
return rtp;
|
||||
}
|
||||
|
||||
void RtpTrack::setNtpStamp(uint32_t rtp_stamp, uint32_t sample_rate, uint64_t ntp_stamp_ms) {
|
||||
_disable_ntp = rtp_stamp == 0 && sample_rate == 0 && ntp_stamp_ms == 0;
|
||||
if (sample_rate) {
|
||||
_ntp_stamp.setNtpStamp(rtp_stamp, sample_rate, ntp_stamp_ms);
|
||||
void RtpTrack::setNtpStamp(uint32_t rtp_stamp, uint64_t ntp_stamp_ms) {
|
||||
_disable_ntp = rtp_stamp == 0 && ntp_stamp_ms == 0;
|
||||
if (!_disable_ntp) {
|
||||
_ntp_stamp.setNtpStamp(rtp_stamp, ntp_stamp_ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user