mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复时间戳覆盖的累积误差
This commit is contained in:
parent
c353c626c1
commit
3f12c0ccde
@ -62,7 +62,11 @@ void Stamp::revise(int64_t dts, int64_t pts, int64_t &dts_out, int64_t &pts_out,
|
||||
|
||||
if(_last_dts != dts){
|
||||
//时间戳发生变更
|
||||
_relativeStamp += deltaStamp(modifyStamp ? _ticker.elapsedTime() : dts);
|
||||
if(modifyStamp){
|
||||
_relativeStamp = _ticker.elapsedTime();
|
||||
}else{
|
||||
_relativeStamp += deltaStamp(dts);
|
||||
}
|
||||
_last_dts = dts;
|
||||
}
|
||||
dts_out = _relativeStamp;
|
||||
|
Loading…
Reference in New Issue
Block a user