Index: libs/libmythtv/NuppelVideoPlayer.h
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.h	(revision 7553)
+++ libs/libmythtv/NuppelVideoPlayer.h	(working copy)
@@ -229,13 +231,13 @@
 
     // Time Code adjustment stuff
     long long AdjustAudioTimecodeOffset(long long v)
-        { audio_timecode_offset += v;  return audio_timecode_offset; }
+        { tc_wrap[TC_AUDIO] += v;  return tc_wrap[TC_AUDIO]; }
     long long ResetAudioTimecodeOffset(void)
-        { audio_timecode_offset = 0LL; return audio_timecode_offset; }
+        { tc_wrap[TC_AUDIO] = 0LL; return tc_wrap[TC_AUDIO]; }
     long long ResyncAudioTimecodeOffset(void)
-        { audio_timecode_offset = 0x8000LL << 12; return 0L; }
+        { tc_wrap[TC_AUDIO] = LONG_LONG_MIN; return 0L; }
     long long GetAudioTimecodeOffset(void) const 
-        { return audio_timecode_offset; }
+        { return tc_wrap[TC_AUDIO]; }
  
   protected:
     void DisplayPauseFrame(void);
@@ -514,8 +516,6 @@
     int        avsync_avg;
     int        avsync_oldavg;
     int        refreshrate;
-    long long  lastaudiotime;
-    long long  audio_timecode_offset;
     bool       lastsync;
     bool       m_playing_slower;
     float      m_stored_audio_stretchfactor;
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(revision 7553)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(working copy)
@@ -143,7 +143,6 @@
       vsynctol(30/4),               avsync_delay(0),
       avsync_adjustment(0),         avsync_avg(0),
       avsync_oldavg(0),             refreshrate(0),
-      lastaudiotime(0),             audio_timecode_offset(0),
       lastsync(false),              m_playing_slower(false),
       m_stored_audio_stretchfactor(1.0),
       // Audio warping stuff
@@ -1449,19 +1465,14 @@
     if (audioOutput && normal_speed)
     {
         long long currentaudiotime = audioOutput->GetAudiotime();
-        if (audio_timecode_offset == (long long)0x8000000000000000LL)
-            audio_timecode_offset = buffer->timecode - currentaudiotime;
-
-        // ms, same scale as timecodes
-        lastaudiotime = currentaudiotime + audio_timecode_offset;
 #if 0
         VERBOSE(VB_PLAYBACK, QString("A/V timecodes audio %1 video %2 frameinterval %3 avdel %4 avg %5 tcoffset %6")
-                .arg(lastaudiotime)
+                .arg(currentaudiotime)
                 .arg(buffer->timecode)
                 .arg(frame_interval)
-                .arg(buffer->timecode - lastaudiotime)
+                .arg(buffer->timecode - currentaudiotime)
                 .arg(avsync_avg)
-                .arg(audio_timecode_offset)
+                .arg(tc_wrap[TC_AUDIO])
                  );
 #endif
         if (currentaudiotime != 0 && buffer->timecode != 0)
@@ -1482,7 +1493,7 @@
                     videosync->AdvanceTrigger();
             }
 
-            avsync_delay = (buffer->timecode - lastaudiotime) * 1000; // uSecs
+            avsync_delay = (buffer->timecode - currentaudiotime) * 1000; // uSecs
             avsync_avg = (avsync_delay + (avsync_avg * 3)) / 4;
             if (!usevideotimebase)
             {
@@ -1651,7 +1662,6 @@
 
 void NuppelVideoPlayer::OutputVideoLoop(void)
 {
-    lastaudiotime = 0;
     delay = 0;
     avsync_delay = 0;
     avsync_avg = 0;
@@ -2188,6 +2198,16 @@
 
 void NuppelVideoPlayer::WrapTimecode(long long &timecode, TCTypes tc_type) 
 {
+    if ((tc_type == TC_AUDIO) && (tc_wrap[TC_AUDIO] == LONG_LONG_MIN))
+    {
+        long long newaudio;
+        newaudio = tc_lastval[TC_VIDEO] - tc_diff_estimate;
+        tc_wrap[TC_AUDIO] = newaudio - timecode;
+        timecode = newaudio;
+        tc_lastval[TC_AUDIO] = timecode;
+        VERBOSE(VB_IMPORTANT, "Manual Resync AV sync values");
+    }
+
     timecode += tc_wrap[tc_type];
 
     // wrapped
@@ -2206,6 +2226,7 @@
         tc_avcheck_framecounter++;
         if (tc_avcheck_framecounter == 30)
         {
+#if 0
             // something's terribly, terribly wrong.
             if (tc_lastval[TC_AUDIO] < tc_lastval[TC_VIDEO] - 10000000 ||
                 tc_lastval[TC_VIDEO] < tc_lastval[TC_AUDIO] - 10000000)
@@ -2217,6 +2238,7 @@
                 tc_lastval[TC_AUDIO] = timecode;
                 VERBOSE(VB_IMPORTANT, "Guessing at new AV sync values");
             }
+#endif
 
             tc_diff_estimate = tc_lastval[TC_VIDEO] - tc_lastval[TC_AUDIO];
             tc_avcheck_framecounter = 0;
