Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp	(revision 13432)
+++ libs/libmythtv/NuppelVideoPlayer.cpp	(working copy)
@@ -401,7 +401,10 @@
     PauseDecoder();
 
     //cout << "stopping other threads" << endl;
+    internalPauseLock.lock();
     PauseVideo(waitvideo);
+    internalPauseLock.unlock();
+
     if (audioOutput)
     {
         audio_paused = true;
@@ -428,7 +431,10 @@
             QString("Play(%1, normal %2, unpause audio %3)")
             .arg(speed,5,'f',1).arg(normal).arg(unpauseaudio));
 
+    internalPauseLock.lock();
     UnpauseVideo();
+    internalPauseLock.unlock();
+
     if (audioOutput && unpauseaudio)
         audio_paused = false;
     if (ringBuffer)
@@ -446,30 +452,61 @@
     return (actuallypaused &&
             (ringBuffer == NULL || ringBuffer->isPaused()) &&
             (audioOutput == NULL || audioOutput->GetPause()) &&
-            GetVideoPause());
+            IsVideoActuallyPaused());
 }
 
 void NuppelVideoPlayer::PauseVideo(bool wait)
 {
+    QMutexLocker locker(&pauseUnpauseLock);
     video_actually_paused = false;
     pausevideo = true;
 
-    if (wait && !video_actually_paused)
+    for (uint i = 0; wait && !video_actually_paused; i++)
     {
-        while (!videoThreadPaused.wait(1000))
-        {
-            if (eof)
-                return;
+        videoThreadPaused.wait(&pauseUnpauseLock, 250);
+
+        if (video_actually_paused || eof)
+            break;
+
+        if ((i % 10) == 9)
             VERBOSE(VB_IMPORTANT, "Waited too long for video out to pause");
-        }
     }
 }
 
-void NuppelVideoPlayer::UnpauseVideo(void)
+void NuppelVideoPlayer::UnpauseVideo(bool wait)
 {
+    QMutexLocker locker(&pauseUnpauseLock);
     pausevideo = false;
+
+    for (uint i = 0; wait && video_actually_paused; i++)
+    {
+        videoThreadUnpaused.wait(&pauseUnpauseLock, 250);
+
+        if (!video_actually_paused || eof)
+            break;
+
+        if ((i % 10) == 9)
+            VERBOSE(VB_IMPORTANT, "Waited too long for video out to unpause");
+    }
 }
 
+void NuppelVideoPlayer::SetVideoActuallyPaused(bool val)
+{
+    QMutexLocker locker(&pauseUnpauseLock);
+    video_actually_paused = val;
+
+    if (val)
+        videoThreadPaused.wakeAll();
+    else
+        videoThreadUnpaused.wakeAll();
+}
+
+bool NuppelVideoPlayer::IsVideoActuallyPaused(void) const
+{
+    QMutexLocker locker(&pauseUnpauseLock);
+    return video_actually_paused;
+}
+
 void NuppelVideoPlayer::SetPrebuffering(bool prebuffer)
 {
     prebuffering_lock.lock();
@@ -2300,8 +2337,7 @@
         resetvideo = false;
     }
 
-    video_actually_paused = true;
-    videoThreadPaused.wakeAll();
+    SetVideoActuallyPaused(true);
 
     if (videoOutput->IsErrored())
     {
@@ -2408,7 +2444,7 @@
 
 void NuppelVideoPlayer::DisplayNormalFrame(void)
 {
-    video_actually_paused = false;
+    SetVideoActuallyPaused(false);
     resetvideo = false;
 
     if (!ringBuffer->InDVDMenuOrStillFrame() ||
@@ -2692,11 +2728,10 @@
         }
 
         resetvideo = false;
-        video_actually_paused = pausevideo;
+        SetVideoActuallyPaused(pausevideo);
 
         if (pausevideo)
         {
-            videoThreadPaused.wakeAll();
             videofiltersLock.lock();
             videoOutput->ProcessFrame(NULL, osd, videoFilters, pipplayer);
             videofiltersLock.unlock();
@@ -3332,13 +3367,11 @@
 
             if (rewindtime >= 1)
             {
-                PauseVideo();
+                QMutexLocker locker(&internalPauseLock);
 
+                PauseVideo(true);
                 DoRewind();
-
-                UnpauseVideo();
-                while (GetVideoPause())
-                    usleep(1000);
+                UnpauseVideo(true);
             }
             rewindtime = 0;
         }
@@ -3349,17 +3382,17 @@
 
             if (fftime >= 5)
             {
-                PauseVideo();
+                QMutexLocker locker(&internalPauseLock);
 
+                PauseVideo(true);
+
                 if (fftime >= 5)
                     DoFastForward();
 
                 if (eof)
                     continue;
 
-                UnpauseVideo();
-                while (GetVideoPause())
-                    usleep(1000);
+                UnpauseVideo(true);
             }
 
             fftime = 0;
@@ -3367,25 +3400,22 @@
 
         if (need_change_dvd_track)
         {
-            PauseVideo();
+            QMutexLocker locker(&internalPauseLock);
 
+            PauseVideo(true);
             DoChangeDVDTrack();
+            UnpauseVideo(true);
 
-            UnpauseVideo();
-            while (GetVideoPause())
-                usleep(1000);
-
             need_change_dvd_track = 0;
         }
 
         if (skipcommercials != 0 && ffrew_skip == 1)
         {
-            PauseVideo();
+            QMutexLocker locker(&internalPauseLock);
 
+            PauseVideo(true);
             DoSkipCommercials(skipcommercials);
-            UnpauseVideo();
-            while (GetVideoPause())
-                usleep(1000);
+            UnpauseVideo(true);
 
             skipcommercials = 0;
             continue;
@@ -3418,11 +3448,11 @@
             }
             else
             {
-                PauseVideo();
+                QMutexLocker locker(&internalPauseLock);
+
+                PauseVideo(true);
                 JumpToFrame(deleteIter.key());
-                UnpauseVideo();
-                while (GetVideoPause())
-                    usleep(1000);
+                UnpauseVideo(true);
             }
         }
     }
@@ -5765,13 +5795,15 @@
                         .arg(commBreakIter.key() - 
                         (int)(commrewindamount * video_frame_rate)));
 
-                    PauseVideo();
+                    internalPauseLock.lock();
+
+                    PauseVideo(true);
                     JumpToFrame(commBreakIter.key() -
                         (int)(commrewindamount * video_frame_rate));
-                    UnpauseVideo();
-                    while (GetVideoPause())
-                        usleep(1000);
+                    UnpauseVideo(true);
 
+                    internalPauseLock.unlock();
+
                     GetFrame(1, true);
                 }
                 else
Index: libs/libmythtv/NuppelVideoPlayer.h
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.h	(revision 13432)
+++ libs/libmythtv/NuppelVideoPlayer.h	(working copy)
@@ -418,8 +418,9 @@
 
     // Private pausing stuff
     void PauseVideo(bool wait = true);
-    void UnpauseVideo(void);
-    bool GetVideoPause(void) const { return video_actually_paused; }
+    void UnpauseVideo(bool wait = false);
+    void SetVideoActuallyPaused(bool val);
+    bool IsVideoActuallyPaused(void) const;
 
     // Private decoder stuff
     void  SetDecoder(DecoderBase *dec);
@@ -523,7 +524,10 @@
     // State
     QWaitCondition decoderThreadPaused;
     QWaitCondition videoThreadPaused;
-    QMutex   vidExitLock;
+    QWaitCondition videoThreadUnpaused;
+    mutable QMutex vidExitLock;
+    mutable QMutex pauseUnpauseLock;
+    mutable QMutex internalPauseLock;
     bool     eof;             ///< At end of file/ringbuffer
     bool     m_double_framerate;///< Output fps is double Video (input) rate
     bool     m_can_double;    ///< VideoOutput capable of doubling frame rate
