Permalink
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.
  • Loading branch information...
1 parent 5aa72eb commit 3716894d56190f401c4956863c3140427b603e87 @tralph tralph committed Feb 1, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 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();

0 comments on commit 3716894

Please sign in to comment.