修复时间戳覆盖的累积误差

This commit is contained in:
xiongziliang 2019-12-16 15:49:52 +08:00
parent c353c626c1
commit 3f12c0ccde

View File

@ -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;