Skip to content
Browse files

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 3716894)
  • Loading branch information...
1 parent 7e34a2b commit 849b5cae9090111d191fb5ee7f55152507767a85 @tralph tralph committed Feb 1, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 mythtv/libs/libmythtv/mythplayer.cpp
View
9 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();

0 comments on commit 849b5ca

Please sign in to comment.
Something went wrong with that request. Please try again.