summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Ralph <tralph@mythtv.org>2011-02-01 16:55:52 (GMT)
committer Taylor Ralph <tralph@mythtv.org>2011-02-01 16:55:52 (GMT)
commit3716894d56190f401c4956863c3140427b603e87 (patch)
tree7510138f34223b6c80eeadb04523c726c3519fff
parent5aa72ebce5661e966b1c5a73a576bc1bf7c3cca1 (diff)
Fix seeking after LiveTV transitions.
After a LiveTV transition occured we were setting the max seek to the amount of frames written by the recorder for the current segment even though we were still playing a previous segment in the LiveTV chain. Also, when seeking near the end of a segment we were setting fftime to -1 which prevented further seeking due to an incorrect comparison in FastForward. Regs #9023.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 77d9f42..5afa693 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2172,7 +2172,7 @@ bool MythPlayer::FastForward(float seconds)
if (!videoOutput)
return false;
- if (fftime >= 0)
+ if (fftime <= 0)
fftime = (long long)(seconds * video_frame_rate);
return fftime > CalcMaxFFTime(fftime, false);
}
@@ -2182,7 +2182,7 @@ bool MythPlayer::Rewind(float seconds)
if (!videoOutput)
return false;
- if (rewindtime >= 0)
+ if (rewindtime <= 0)
rewindtime = (long long)(seconds * video_frame_rate);
return (uint64_t)rewindtime >= framesPlayed;
}
@@ -3446,8 +3446,11 @@ void MythPlayer::WaitForSeek(uint64_t frame, bool override_seeks,
(allpaused && !deleteMap.IsEditing()) ? true: after;
decoder->setExactSeeks(before);
+ bool islivetvcur = (livetv && player_ctx->tvchain &&
+ !player_ctx->tvchain->HasNext());
+
uint64_t max = totalFrames;
- if ((livetv || (watchingrecording && player_ctx->recorder &&
+ if ((islivetvcur || (watchingrecording && player_ctx->recorder &&
player_ctx->recorder->IsValidRecorder())))
{
max = (uint64_t)player_ctx->recorder->GetFramesWritten();