Browse files

Calculate current playback position using frame count and frame rate.

According to Taylor Ralph, the code which uses timestamps is not
finished and shouldn't be used yet.  For one thing, it doesn't handle
discontinuities in the timestamps.

Note: timestamps are still used sometimes to calculate recording
lengths.  That will need to be fixed in a future commit.
  • Loading branch information...
gigem committed Sep 19, 2012
1 parent 91c3e66 commit 286186281dcca4a3f25f591e6658310bc9d375fb
Showing with 4 additions and 0 deletions.
  1. +4 −0 mythtv/libs/libmythtv/mythplayer.cpp
@@ -4587,9 +4587,13 @@ int MythPlayer::GetSecondsBehind(void) const
int64_t MythPlayer::GetSecondsPlayed(void)
+#if 0
return decoder->IsCodecMPEG() ?
(disp_timecode / 1000.f) :
(framesPlayed / video_frame_rate);
+ return framesPlayed / video_frame_rate;
int64_t MythPlayer::GetTotalSeconds(void) const

0 comments on commit 2861862

Please sign in to comment.