Permalink
Browse files

Allow seeking back through the live TV chain.

Fixes a regression introduced in 0.25.  Refs #11174.
  • Loading branch information...
stichnot committed Jan 15, 2013
1 parent 47a2da4 commit fd3d2c1de2bc6377632c5c82f1dc8f455b0c8fd8
Showing with 19 additions and 12 deletions.
  1. +8 −2 mythtv/libs/libmythtv/mythplayer.cpp
  2. +11 −10 mythtv/libs/libmythtv/tv_play.cpp
@@ -2428,9 +2428,15 @@ bool MythPlayer::Rewind(float seconds)
if (rewindtime <= 0)
{
float current = ComputeSecs(framesPlayed, true);
float dest = current + seconds;
float dest = current - seconds;
if (dest < 0)
{
if (CalcRWTime(framesPlayed + 1) < 0)
return true;
dest = 0;
}
uint64_t target = FindFrame(dest, true);
rewindtime = target - framesPlayed;
rewindtime = framesPlayed - target;
}
return (uint64_t)rewindtime >= framesPlayed;
}
@@ -6270,17 +6270,18 @@ void TV::DoSeek(PlayerContext *ctx, float time, const QString &mesg,
keyRepeatTimer.start();
NormalSpeed(ctx);
time += StopFFRew(ctx);
uint64_t currentFrameAbs = ctx->player->GetFramesPlayed();
if (timeIsOffset)
time +=
ctx->player->TranslatePositionFrameToMs(currentFrameAbs,
honorCutlist) / 1000.0;
if (time < 0)
time = 0;
uint64_t desiredFrameRel =
ctx->player->TranslatePositionMsToFrame(time * 1000, honorCutlist);
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
DoPlayerSeekToFrame(ctx, desiredFrameRel);
{
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
DoPlayerSeek(ctx, time);
}
else
{
uint64_t desiredFrameRel = ctx->player->
TranslatePositionMsToFrame(time * 1000, honorCutlist);
ctx->UnlockDeletePlayer(__FILE__, __LINE__);
DoPlayerSeekToFrame(ctx, desiredFrameRel);
}
UpdateOSDSeekMessage(ctx, mesg, kOSDTimeout_Med);
}
else

0 comments on commit fd3d2c1

Please sign in to comment.