mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 04:08:57 +08:00
在根据rtsp pts生成ntp时,由于pts可能回退,旧有逻辑不允许回退将导致ntp异常
This commit is contained in:
parent
5ca4ed53b2
commit
23e24d07e6
@ -48,8 +48,9 @@ int64_t DeltaStamp::deltaStamp(int64_t stamp) {
|
||||
|
||||
// 时间戳增量为负,说明时间戳回环了或回退了
|
||||
_last_stamp = stamp;
|
||||
// 时间戳回退了,强制相对时间戳加1
|
||||
return 1;
|
||||
|
||||
// 如果时间戳回退不多,那么返回负值,否则返回加1
|
||||
return -ret < MAX_CTS ? ret : 1;
|
||||
}
|
||||
|
||||
void Stamp::setPlayBack(bool playback) {
|
||||
|
Loading…
Reference in New Issue
Block a user