Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 75286)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 75287)
@@ -142,5 +142,8 @@
 #endif
 #ifdef VBOX_WITH_AUDIO_VIDEOREC
-    int i_videoRecLoad(settings::CaptureSettings &Settings);
+    int i_videoRecCreate(void);
+    void i_videoRecDestroy(void);
+    int i_videoRecEnable(BOOL fEnable, util::AutoWriteLock *pAutoLock);
+    int i_videoRecGetSettings(settings::CaptureSettings &Settings);
     int i_videoRecStart(void);
     int i_videoRecStop(void);
@@ -207,8 +210,4 @@
 #ifdef VBOX_WITH_USB_CARDREADER
     UsbCardReader *i_getUsbCardReader() { return mUsbCardReader; }
-#endif
-
-#ifdef VBOX_WITH_VIDEOREC
-    int i_videoCaptureEnable(BOOL fEnable, util::AutoWriteLock *pAutoLock);
 #endif
 
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 75286)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 75287)
@@ -5607,5 +5607,5 @@
  * @param   pAutoLock           Pointer to auto write lock to use for attaching/detaching required driver(s) at runtime.
  */
-int Console::i_videoCaptureEnable(BOOL fEnable, util::AutoWriteLock *pAutoLock)
+int Console::i_videoRecEnable(BOOL fEnable, util::AutoWriteLock *pAutoLock)
 {
     AssertPtrReturn(pAutoLock, VERR_INVALID_POINTER);
@@ -5616,5 +5616,8 @@
     if (pDisplay)
     {
-        if (RT_BOOL(fEnable) != Capture.mpVideoRecCtx->IsStarted())
+        const bool fEnabled =    Capture.mpVideoRecCtx
+                              && Capture.mpVideoRecCtx->IsStarted();
+
+        if (RT_BOOL(fEnable) != fEnabled)
         {
             LogRel(("VideoRec: %s\n", fEnable ? "Enabling" : "Disabling"));
@@ -5624,18 +5627,22 @@
             if (fEnable)
             {
+                vrc = i_videoRecCreate();
+                if (RT_SUCCESS(vrc))
+                {
 # ifdef VBOX_WITH_AUDIO_VIDEOREC
-                /* Attach the video recording audio driver if required. */
-                if (   Capture.mpVideoRecCtx->IsFeatureEnabled(CaptureFeature_Audio)
-                    && Capture.mAudioVideoRec)
-                {
-                    vrc = Capture.mAudioVideoRec->applyConfiguration(Capture.mpVideoRecCtx->GetConfig());
-                    if (RT_SUCCESS(vrc))
-                        vrc = Capture.mAudioVideoRec->doAttachDriverViaEmt(mpUVM, pAutoLock);
-                }
+                    /* Attach the video recording audio driver if required. */
+                    if (   Capture.mpVideoRecCtx->IsFeatureEnabled(CaptureFeature_Audio)
+                        && Capture.mAudioVideoRec)
+                    {
+                        vrc = Capture.mAudioVideoRec->applyConfiguration(Capture.mpVideoRecCtx->GetConfig());
+                        if (RT_SUCCESS(vrc))
+                            vrc = Capture.mAudioVideoRec->doAttachDriverViaEmt(mpUVM, pAutoLock);
+                    }
 # endif
-                if (   RT_SUCCESS(vrc)
-                    && Capture.mpVideoRecCtx->IsReady()) /* Any video recording (audio and/or video) feature enabled? */
-                {
-                    vrc = i_videoRecStart();
+                    if (   RT_SUCCESS(vrc)
+                        && Capture.mpVideoRecCtx->IsReady()) /* Any video recording (audio and/or video) feature enabled? */
+                    {
+                        vrc = i_videoRecStart();
+                    }
                 }
             }
@@ -5646,4 +5653,5 @@
                 Capture.mAudioVideoRec->doDetachDriverViaEmt(mpUVM, pAutoLock);
 # endif
+                i_videoRecDestroy();
             }
 
@@ -5680,5 +5688,5 @@
         AssertComRCReturnRC(rc);
 
-        int vrc = i_videoCaptureEnable(fEnabled, &alock);
+        int vrc = i_videoRecEnable(fEnabled, &alock);
         if (RT_SUCCESS(vrc))
         {
@@ -6884,5 +6892,5 @@
 
 #ifdef VBOX_WITH_VIDEOREC
-int Console::i_videoRecLoad(settings::CaptureSettings &Settings)
+int Console::i_videoRecGetSettings(settings::CaptureSettings &Settings)
 {
     Assert(mMachine.isNotNull());
@@ -6930,4 +6938,40 @@
 
 /**
+ * Creates the recording context.
+ *
+ * @returns IPRT status code.
+ */
+int Console::i_videoRecCreate(void)
+{
+    AssertReturn(Capture.mpVideoRecCtx == NULL, VERR_WRONG_ORDER);
+
+    int rc = VINF_SUCCESS;
+
+    try
+    {
+        Capture.mpVideoRecCtx = new CaptureContext(this);
+    }
+    catch (std::bad_alloc &)
+    {
+        return VERR_NO_MEMORY;
+    }
+    catch (int &rc2)
+    {
+        return rc2;
+    }
+
+    return rc;
+}
+
+/**
+ * Destroys the recording context.
+ */
+void Console::i_videoRecDestroy(void)
+{
+    if (Capture.mpVideoRecCtx)
+        delete Capture.mpVideoRecCtx;
+}
+
+/**
  * Starts capturing. Does nothing if capturing is already active.
  *
@@ -6936,24 +6980,13 @@
 int Console::i_videoRecStart(void)
 {
-    if (Capture.mpVideoRecCtx && Capture.mpVideoRecCtx->IsStarted())
+    AssertPtrReturn(Capture.mpVideoRecCtx, VERR_WRONG_ORDER);
+
+    if (Capture.mpVideoRecCtx->IsStarted())
         return VINF_SUCCESS;
 
     LogRel(("VideoRec: Starting ...\n"));
 
-    try
-    {
-        Capture.mpVideoRecCtx = new CaptureContext(this);
-    }
-    catch (std::bad_alloc &)
-    {
-        return VERR_NO_MEMORY;
-    }
-    catch (int &rc)
-    {
-        return rc;
-    }
-
     settings::CaptureSettings Settings;
-    int rc = i_videoRecLoad(Settings);
+    int rc = i_videoRecGetSettings(Settings);
     if (RT_SUCCESS(rc))
     {
@@ -6977,5 +7010,7 @@
 int Console::i_videoRecStop(void)
 {
-    if (!Capture.mpVideoRecCtx || !Capture.mpVideoRecCtx->IsStarted())
+    AssertPtrReturn(Capture.mpVideoRecCtx, VERR_WRONG_ORDER);
+
+    if (!Capture.mpVideoRecCtx->IsStarted())
         return VINF_SUCCESS;
 
@@ -10098,5 +10133,5 @@
         if (fCaptureEnabled)
         {
-            int vrc2 = pConsole->i_videoCaptureEnable(fCaptureEnabled, &alock);
+            int vrc2 = pConsole->i_videoRecEnable(fCaptureEnabled, &alock);
             if (RT_SUCCESS(vrc2))
             {
Index: /trunk/src/VBox/Main/src-server/CaptureSettingsImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/CaptureSettingsImpl.cpp	(revision 75286)
+++ /trunk/src/VBox/Main/src-server/CaptureSettingsImpl.cpp	(revision 75287)
@@ -116,5 +116,7 @@
 
     AutoWriteLock thatlock(that COMMA_LOCKVAL_SRC_POS);
+
     m->bd.share(that->m->bd);
+    m->mapScreenSettings = that->m->mapScreenSettings;
 
     autoInitSpan.setSucceeded();
@@ -146,5 +148,7 @@
 
     AutoWriteLock thatlock(that COMMA_LOCKVAL_SRC_POS);
+
     m->bd.attachCopy(that->m->bd);
+    m->mapScreenSettings = that->m->mapScreenSettings;
 
     autoInitSpan.setSucceeded();
@@ -311,4 +315,7 @@
     }
 
+    ComAssertComRC(rc);
+    Assert(m->mapScreenSettings.size() == data.mapScreens.size());
+
     // simply copy
     m->bd.assignCopy(&data);
