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-03 03:45:07 (GMT)
commit849b5cae9090111d191fb5ee7f55152507767a85 (patch)
tree81c744f0f6cfcf65e51d40b49eca9e217aa84e7a
parent7e34a2b84c45e94b4a3891e2b84e467494ea73b9 (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. (cherry picked from commit 3716894d56190f401c4956863c3140427b603e87)
-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 e4d7c1f..43b324c 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2099,7 +2099,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);
}
@@ -2109,7 +2109,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;
}
@@ -3366,8 +3366,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();