diff --git a/mythtv/libs/libmythtv/decoderbase.h b/mythtv/libs/libmythtv/decoderbase.h
index a736f23dc7a..87eba8ee22c 100644
--- a/mythtv/libs/libmythtv/decoderbase.h
+++ b/mythtv/libs/libmythtv/decoderbase.h
@@ -204,6 +204,7 @@ class DecoderBase
     virtual void UpdateFramesPlayed(void);
     long long GetFramesRead(void) const { return m_framesRead; }
     long long GetFramesPlayed(void) const { return m_framesPlayed; }
+    void SetFramesPlayed(long long newValue) {m_framesPlayed = newValue;}
 
     virtual QString GetCodecDecoderName(void) const = 0;
     virtual QString GetRawEncodingType(void) { return QString(); }
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index db421c7225b..7f12f91e427 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -225,6 +225,7 @@ MythPlayer::MythPlayer(PlayerFlags flags)
       numdroppedframes(0),
       prior_audiotimecode(0),
       prior_videotimecode(0),
+      m_timeOffsetBase(0),
       // LiveTVChain stuff
       m_tv(nullptr),                isDummy(false),
       // Counter for buffering messages
@@ -2231,6 +2232,7 @@ void MythPlayer::AVSync2(VideoFrame *buffer)
             maxtcval = 0;
             maxtcframes = 0;
             numdroppedframes = 0;
+            m_timeOffsetBase = TranslatePositionFrameToMs(framesPlayed, false) - videotimecode;
         }
 
         if (videotimecode == 0)
@@ -2252,6 +2254,10 @@ void MythPlayer::AVSync2(VideoFrame *buffer)
         else
             framedue = unow + frame_interval / 2;
 
+        // recalculate framesPlayed to conform to actual time code.
+        framesPlayed = TranslatePositionMsToFrame(videotimecode + m_timeOffsetBase, false);
+        decoder->SetFramesPlayed(framesPlayed);
+
         lateness = unow - framedue;
         dropframe = false;
         if (lateness > 30000)
diff --git a/mythtv/libs/libmythtv/mythplayer.h b/mythtv/libs/libmythtv/mythplayer.h
index 4b295af28fe..088da8a04ea 100644
--- a/mythtv/libs/libmythtv/mythplayer.h
+++ b/mythtv/libs/libmythtv/mythplayer.h
@@ -858,6 +858,7 @@ class MTV_PUBLIC MythPlayer
     int       numdroppedframes; // number of consecutive dropped frames.
     int64_t   prior_audiotimecode;    // time code from prior frame
     int64_t   prior_videotimecode;    // time code from prior frame
+    int64_t   m_timeOffsetBase;
 
     // LiveTV
     TV *m_tv;
