Skip to content

Commit

Permalink
forgot to skip frame rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Dec 14, 2015
1 parent f21f55d commit 5f264e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/VideoThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ void VideoThread::run()
*after seeking forward, a packet may be the old, v packet may be
*the new packet, then the d.delay is very large, omit it.
*/
if (pkt.pts < d.render_pts0) // skip rendering until decoded frame reaches desired pts
skip_render = true;
if (seeking)
diff = 0; // TODO: here?
if (!sync_audio && diff > 0) {
Expand Down Expand Up @@ -530,6 +528,11 @@ void VideoThread::run()
else if (seek_count > 0)
seek_count++;
}
if (skip_render) {
qDebug("skip rendering @%.3f", pts);
pkt = Packet();
continue;
}
Q_ASSERT(d.statistics);
d.statistics->video.current_time = QTime(0, 0, 0).addMSecs(int(pts * 1000.0)); //TODO: is it expensive?
applyFilters(frame);
Expand Down

0 comments on commit 5f264e2

Please sign in to comment.