From 0e0608dc27c7ed587ded680caafb69f4cb09d03a Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 20 Oct 2021 17:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9dts=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E5=9B=9E=E9=80=80=E5=AF=BC=E8=87=B4=E5=BD=95=E5=83=8F?= =?UTF-8?q?=E5=88=87=E7=89=87=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Record/MP4Recorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Record/MP4Recorder.cpp b/src/Record/MP4Recorder.cpp index 8d60d69d..10d76130 100644 --- a/src/Record/MP4Recorder.cpp +++ b/src/Record/MP4Recorder.cpp @@ -98,7 +98,7 @@ void MP4Recorder::closeFile() { } bool MP4Recorder::inputFrame(const Frame::Ptr &frame) { - if (_last_dts == 0) { + if (_last_dts == 0 || _last_dts > frame->dts()) { //极少情况下dts时间戳可能回退 _last_dts = frame->dts(); }