From 34afa14316c2052bcef2822e82b32c11e0939e54 Mon Sep 17 00:00:00 2001 From: wang-bin Date: Thu, 14 Jun 2018 16:24:46 +0800 Subject: [PATCH] fix the 1st frame timestamp. step backward at beginning should work --- src/VideoThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VideoThread.cpp b/src/VideoThread.cpp index a86f08d78..9e4cf061f 100644 --- a/src/VideoThread.cpp +++ b/src/VideoThread.cpp @@ -523,7 +523,7 @@ void VideoThread::run() continue; } pkt_data = pkt.data.constData(); - if (frame.timestamp() <= 0) + if (frame.timestamp() < 0) frame.setTimestamp(pkt.pts); // pkt.pts is wrong. >= real timestamp const qreal pts = frame.timestamp(); d.pts_history.push_back(pts);