From da7d625466eb344cfd21b896a7c120d1d33a6fc2 Mon Sep 17 00:00:00 2001
From: Richard <peper03@yahoo.com>
Date: Sun, 9 Dec 2012 20:24:01 +0100
Subject: [PATCH] Always update the still frame timer whenever the timeout
changes (including 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.
---
mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp | 14 +++++++++-----
mythtv/libs/libmythtv/DVD/mythdvdplayer.cpp | 8 +++++++-
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp b/mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
index cb9b1af..1015f49 100644
a
|
b
|
int DVDRingBuffer::safe_read(void *data, uint sz) |
657 | 657 | WaitForPlayer(); |
658 | 658 | } |
659 | 659 | |
660 | | // if the new cell is a still frame, reset the timer |
| 660 | // Make sure the still frame timer is updated (if this isn't |
| 661 | // a still frame, this will ensure the timer knows about it). |
661 | 662 | if (m_parent) |
662 | 663 | { |
663 | | if (m_still && (m_still < 0xff)) |
664 | | m_parent->ResetStillFrameTimer(); |
665 | | else |
666 | | m_parent->SetStillFrameTimeout(0); |
| 664 | m_parent->SetStillFrameTimeout(m_still); |
667 | 665 | } |
668 | 666 | |
669 | 667 | // clear menus/still frame selections |
… |
… |
void DVDRingBuffer::SkipStillFrame(void) |
1069 | 1067 | QMutexLocker locker(&m_seekLock); |
1070 | 1068 | LOG(VB_PLAYBACK, LOG_INFO, LOC + "Skipping still frame."); |
1071 | 1069 | dvdnav_still_skip(m_dvdnav); |
| 1070 | |
| 1071 | // Make sure the still frame timer is disabled. |
| 1072 | if (m_parent) |
| 1073 | { |
| 1074 | m_parent->SetStillFrameTimeout(0); |
| 1075 | } |
1072 | 1076 | } |
1073 | 1077 | |
1074 | 1078 | void DVDRingBuffer::WaitSkip(void) |
diff --git a/mythtv/libs/libmythtv/DVD/mythdvdplayer.cpp b/mythtv/libs/libmythtv/DVD/mythdvdplayer.cpp
index 1c4fa45..463b384 100644
a
|
b
|
void MythDVDPlayer::ResetStillFrameTimer(void) |
657 | 657 | |
658 | 658 | void MythDVDPlayer::SetStillFrameTimeout(int length) |
659 | 659 | { |
660 | | m_stillFrameLength = length; |
| 660 | if (length != m_stillFrameLength) |
| 661 | { |
| 662 | m_stillFrameTimerLock.lock(); |
| 663 | m_stillFrameLength = length; |
| 664 | m_stillFrameTimer.restart(); |
| 665 | m_stillFrameTimerLock.unlock(); |
| 666 | } |
661 | 667 | } |
662 | 668 | |
663 | 669 | void MythDVDPlayer::StillFrameCheck(void) |