summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-11-09 14:51:27 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-11-09 14:51:27 (GMT)
commit088335b4bd8147a1f33aca8f7fb62a73fdc88e34 (patch)
treeb31627cb322e53badb06e93cc0a7ba4ad1019e9d
parent31e9528e12afea4306e1a249a4719d4579ecd6e3 (diff)
Fix DVD and Blu Ray seeking.
The main problem here was that when paused, the seek position would fallback to the current speed (i.e. 0) and playback would resume from the beginning of the title. With DVD playback, we were also asking the dvdnav object to seek to the nearest cell - which led to some sizeable search discrepancies depending where playback was relative to the nearest cell. We now ask for a more accurate search. Backported from master 4b0803be0c0974c184 Fixes #9305
-rw-r--r--mythtv/libs/libmythtv/DVDRingBuffer.cpp4
-rw-r--r--mythtv/libs/libmythtv/decoderbase.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/mythtv/libs/libmythtv/DVDRingBuffer.cpp b/mythtv/libs/libmythtv/DVDRingBuffer.cpp
index 2cfec54..7148eb4 100644
--- a/mythtv/libs/libmythtv/DVDRingBuffer.cpp
+++ b/mythtv/libs/libmythtv/DVDRingBuffer.cpp
@@ -111,7 +111,7 @@ long long DVDRingBufferPriv::Seek(long long time)
if (m_parent)
ffrewSkip = m_parent->GetFFRewSkip();
- if (ffrewSkip != 1 && time != 0)
+ if (ffrewSkip != 1 && ffrewSkip != 0 && time != 0)
{
QMap<uint, uint>::const_iterator it = m_seekSpeedMap.lowerBound(labs(time));
if (it == m_seekSpeedMap.end())
@@ -125,7 +125,7 @@ long long DVDRingBufferPriv::Seek(long long time)
else
{
m_seektime = (uint64_t)time;
- dvdRet = dvdnav_absolute_time_search(m_dvdnav, m_seektime, 1);
+ dvdRet = dvdnav_absolute_time_search(m_dvdnav, m_seektime, 0);
}
VERBOSE(VB_PLAYBACK+VB_EXTRA,
diff --git a/mythtv/libs/libmythtv/decoderbase.cpp b/mythtv/libs/libmythtv/decoderbase.cpp
index 8849258..30cb36b 100644
--- a/mythtv/libs/libmythtv/decoderbase.cpp
+++ b/mythtv/libs/libmythtv/decoderbase.cpp
@@ -865,7 +865,7 @@ long long DecoderBase::DVDFindPosition(long long desiredFrame)
current_speed = (int)m_parent->GetNextPlaySpeed();
}
- if (ffrewSkip == 1)
+ if (ffrewSkip == 1 || ffrewSkip == 0)
{
diffTime = (int)ceil((desiredFrame - framesPlayed) / fps);
desiredTimePos = ringBuffer->DVD()->GetCurrentTime() +
@@ -896,7 +896,7 @@ long long DecoderBase::BDFindPosition(long long desiredFrame)
current_speed = (int)m_parent->GetNextPlaySpeed();
}
- if (ffrewSkip == 1)
+ if (ffrewSkip == 1 || ffrewSkip == 0)
{
diffTime = (int)ceil((desiredFrame - framesPlayed) / fps);
desiredTimePos = ringBuffer->BD()->GetCurrentTime() +