From 3f12c0ccdead899539c0334661bc531664105380 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Mon, 16 Dec 2019 15:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E7=9A=84=E7=B4=AF=E7=A7=AF=E8=AF=AF=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Stamp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Common/Stamp.cpp b/src/Common/Stamp.cpp index 4474fe45..f3507869 100644 --- a/src/Common/Stamp.cpp +++ b/src/Common/Stamp.cpp @@ -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;