Skip to content

Commit

Permalink
Always update the still frame timer whenever the timeout changes (inc…
Browse files Browse the repository at this point in the history
…luding when it should be disabled) to ensure that it doesn't 'expire' accidentally and cause the next still frame (at whatever point in time that may be) to be skipped.

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information
Richard authored and stuartm committed Dec 11, 2012
1 parent 9171a65 commit d9b022e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 9 additions & 5 deletions mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
Expand Up @@ -657,13 +657,11 @@ int DVDRingBuffer::safe_read(void *data, uint sz)
WaitForPlayer();
}

// if the new cell is a still frame, reset the timer
// Make sure the still frame timer is updated (if this isn't
// a still frame, this will ensure the timer knows about it).
if (m_parent)
{
if (m_still && (m_still < 0xff))
m_parent->ResetStillFrameTimer();
else
m_parent->SetStillFrameTimeout(0);
m_parent->SetStillFrameTimeout(m_still);
}

// clear menus/still frame selections
Expand Down Expand Up @@ -1069,6 +1067,12 @@ void DVDRingBuffer::SkipStillFrame(void)
QMutexLocker locker(&m_seekLock);
LOG(VB_PLAYBACK, LOG_INFO, LOC + "Skipping still frame.");
dvdnav_still_skip(m_dvdnav);

// Make sure the still frame timer is disabled.
if (m_parent)
{
m_parent->SetStillFrameTimeout(0);
}
}

void DVDRingBuffer::WaitSkip(void)
Expand Down
8 changes: 7 additions & 1 deletion mythtv/libs/libmythtv/DVD/mythdvdplayer.cpp
Expand Up @@ -657,7 +657,13 @@ void MythDVDPlayer::ResetStillFrameTimer(void)

void MythDVDPlayer::SetStillFrameTimeout(int length)
{
m_stillFrameLength = length;
if (length != m_stillFrameLength)
{
m_stillFrameTimerLock.lock();
m_stillFrameLength = length;
m_stillFrameTimer.restart();
m_stillFrameTimerLock.unlock();
}
}

void MythDVDPlayer::StillFrameCheck(void)
Expand Down

0 comments on commit d9b022e

Please sign in to comment.