Skip to content

Commit

Permalink
[seek] improves instant seek in seek handler
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaggi committed Apr 10, 2015
1 parent 3fd4e1a commit 64c51c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xbmc/utils/SeekHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ int CSeekHandler::GetSeekSeconds(bool forward, SeekType type)

void CSeekHandler::Seek(bool forward, float amount, float duration /* = 0 */, bool analogSeek /* = false */, SeekType type /* = SEEK_TYPE_VIDEO */)
{
CSingleLock lock(m_critSection);

// abort if we already perform a seek
if (g_infoManager.m_performingSeek)
return;

// not yet seeking
if (!m_requireSeek)
{
Expand Down Expand Up @@ -222,7 +228,7 @@ bool CSeekHandler::InProgress() const

void CSeekHandler::Process()
{
if (m_timer.GetElapsedMilliseconds() > m_seekDelay && m_requireSeek)
if (m_timer.GetElapsedMilliseconds() >= m_seekDelay && m_requireSeek)
{
g_infoManager.m_performingSeek = true;

Expand Down

0 comments on commit 64c51c2

Please sign in to comment.