Skip to content

Commit

Permalink
Fixes #11151 by correcting a float-to-integer truncation problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
stichnot committed Oct 13, 2012
1 parent 9e12a61 commit 4a09ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -2375,7 +2375,7 @@ bool MythPlayer::FastForward(float seconds)
return false;

if (fftime <= 0)
fftime = (long long)(seconds * video_frame_rate);
fftime = (long long)(seconds * video_frame_rate + 0.5);
return fftime > CalcMaxFFTime(fftime, false);
}

Expand All @@ -2385,7 +2385,7 @@ bool MythPlayer::Rewind(float seconds)
return false;

if (rewindtime <= 0)
rewindtime = (long long)(seconds * video_frame_rate);
rewindtime = (long long)(seconds * video_frame_rate + 0.5);
return (uint64_t)rewindtime >= framesPlayed;
}

Expand Down

0 comments on commit 4a09ca1

Please sign in to comment.