--- ../../mythtv2/mythtv-0.17/libs/libmythtv/videoout_xv.cpp	2005-02-07 23:34:50.000000000 -0800
+++ libs/libmythtv/videoout_xv.cpp	2005-03-03 23:44:15.000000000 -0800
@@ -819,13 +819,15 @@
 
 void VideoOutputXv::EmbedInWidget(WId wid, int x, int y, int w, int h)
 {
+    pthread_mutex_lock(&lock);
+
     if (embedding)
     {
         MoveResize();
+        pthread_mutex_unlock(&lock);
         return;
     }
 
-    pthread_mutex_lock(&lock);
     data->XJ_curwin = wid;
 
     VideoOutput::EmbedInWidget(wid, x, y, w, h);
