Index: /trunk/src/VBox/Main/src-client/VideoRec.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 46552)
+++ /trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 46553)
@@ -49,5 +49,5 @@
     VIDREC_COPYING = 2,
     /* signal that we are terminating */
-    VIDREC_TERMINATING = 2
+    VIDREC_TERMINATING = 3
 };
 static uint32_t g_enmState = VIDREC_UNINITIALIZED;
@@ -394,5 +394,6 @@
         {
             PVIDEORECSTREAM pStrm = &pCtx->Strm[uScreen];
-            if (ASMAtomicReadBool(&pStrm->fRgbFilled))
+            if (   pStrm->fEnabled
+                && ASMAtomicReadBool(&pStrm->fRgbFilled))
             {
                 rc = videoRecRGBToYUV(pStrm);
@@ -590,8 +591,7 @@
 bool VideoRecIsEnabled(PVIDEORECCONTEXT pCtx)
 {
-    if (!pCtx)
-        return false;
-
-    return pCtx->fEnabled;
+    uint32_t enmState = ASMAtomicReadU32(&g_enmState);
+    return (   enmState == VIDREC_IDLE
+            || enmState == VIDREC_COPYING);
 }
 
@@ -720,5 +720,9 @@
 
         PVIDEORECSTREAM pStrm = &pCtx->Strm[uScreen];
-
+        if (!pStrm->fEnabled)
+        {
+            rc = VINF_TRY_AGAIN; /* not (yet) enabled */
+            break;
+        }
         if (u64TimeStamp < pStrm->u64LastTimeStamp + pStrm->uDelay)
         {
@@ -726,5 +730,4 @@
             break;
         }
-
         if (ASMAtomicReadBool(&pStrm->fRgbFilled))
         {
