Skip to content

Commit

Permalink
Replacing tabs with spaces
Browse files Browse the repository at this point in the history
I don't know what editor I was using that put tabs in!
  • Loading branch information
mike-odom committed Oct 5, 2019
1 parent 6f0f7fc commit 75a0c1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/AVDemuxThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 364,7 @@ bool AVDemuxThread::hasSeekTasks()
if (stepping && stepping_timeout_time > 0 && stepping_timeout_time < QDateTime::currentMSecsSinceEpoch()) {
finishedStepBackward();
}
return !seek_tasks.isEmpty() || current_seek_task || stepping;
return !seek_tasks.isEmpty() || current_seek_task || stepping;
}

qint64 AVDemuxThread::lastSeekPos()
Expand Down
26 changes: 13 additions & 13 deletions src/AVPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,25 860,25 @@ qint64 AVPlayer::position() const

qint64 AVPlayer::displayPosition() const
{
// Return a cached value if there are seek tasks
if (d->seeking || d->read_thread->hasSeekTasks() || (d->read_thread->buffer() && d->read_thread->buffer()->isBuffering())) {
return d->last_known_good_pts = d->read_thread->lastSeekPos();
}
// Return a cached value if there are seek tasks
if (d->seeking || d->read_thread->hasSeekTasks() || (d->read_thread->buffer() && d->read_thread->buffer()->isBuffering())) {
return d->last_known_good_pts = d->read_thread->lastSeekPos();
}

// TODO: videoTime()?
qint64 pts = d->clock->videoTime()*1000.0;
// TODO: videoTime()?
qint64 pts = d->clock->videoTime()*1000.0;

// If we are stepping around, we want the lastSeekPos.
/// But if we're just paused by the user... we want another value.
if (d->was_stepping) {
pts = d->read_thread->lastSeekPos();
}
if (pts < 0) {
return d->last_known_good_pts;
}
d->last_known_good_pts = pts;
if (pts < 0) {
return d->last_known_good_pts;
}
d->last_known_good_pts = pts;

return pts;
return pts;
}

void AVPlayer::setPosition(qint64 position)
Expand Down Expand Up @@ -1582,9 1582,9 @@ void AVPlayer::stepForward()

void AVPlayer::stepBackward()
{
pause(true);
pause(true);
d->was_stepping = true;
d->read_thread->stepBackward();
d->read_thread->stepBackward();
}

void AVPlayer::seek(qreal r)
Expand Down

0 comments on commit 75a0c1e

Please sign in to comment.