diff -Nur old/libbanshee/banshee-player.c new/libbanshee/banshee-player.c
--- old/libbanshee/banshee-player.c	2010-06-24 05:06:14.000000000 +0800
+++ new/libbanshee/banshee-player.c	2010-10-13 12:46:21.000000000 +0800
@@ -57,11 +57,15 @@
 bp_destroy (BansheePlayer *player)
 {
     g_return_if_fail (IS_BANSHEE_PLAYER (player));
-    
-    if (player->mutex != NULL) {
-        g_mutex_free (player->mutex);
+
+    if (player->video_mutex != NULL) {
+        g_mutex_free (player->video_mutex);
     }
-    
+
+    if (player->replaygain_mutex != NULL) {
+        g_mutex_free (player->replaygain_mutex);
+    }
+
     if (player->cdda_device != NULL) {
         g_free (player->cdda_device);
     }
@@ -81,9 +85,10 @@
 bp_new ()
 {
     BansheePlayer *player = g_new0 (BansheePlayer, 1);
-    
-    player->mutex = g_mutex_new ();
-    
+
+    player->video_mutex = g_mutex_new ();
+    player->replaygain_mutex = g_mutex_new ();
+
     return player;
 }
 
diff -Nur old/libbanshee/banshee-player-private.h new/libbanshee/banshee-player-private.h
--- old/libbanshee/banshee-player-private.h	2010-06-24 05:06:14.000000000 +0800
+++ new/libbanshee/banshee-player-private.h	2010-10-12 16:56:17.000000000 +0800
@@ -143,7 +143,8 @@
     gint equalizer_status;
     
     // Pipeline/Playback State
-    GMutex *mutex;
+    GMutex *video_mutex;
+    GMutex *replaygain_mutex;
     GstState target_state;
     gboolean buffering;
     gchar *cdda_device;
diff -Nur old/libbanshee/banshee-player-replaygain.c new/libbanshee/banshee-player-replaygain.c
--- old/libbanshee/banshee-player-replaygain.c	2010-05-18 01:04:22.000000000 +0800
+++ new/libbanshee/banshee-player-replaygain.c	2010-10-12 21:23:45.000000000 +0800
@@ -94,12 +94,12 @@
     // The pad_block_cb can get triggered multiple times, on different threads.
     // Lock around the link/unlink code, so we don't end up going through here
     // with inconsistent state.
-    g_mutex_lock (player->mutex);
+    g_mutex_lock (player->replaygain_mutex);
 
     if ((player->replaygain_enabled && player->rgvolume_in_pipeline) ||
         (!player->replaygain_enabled && !player->rgvolume_in_pipeline)) {
         // The pipeline is already in the correct state.  Unblock the pad, and return.
-        g_mutex_unlock (player->mutex);
+        g_mutex_unlock (player->replaygain_mutex);
         if (gst_pad_is_blocked (srcPad)) {
             gst_pad_set_blocked_async (srcPad, FALSE, &pad_block_cb, player);
         }
@@ -139,7 +139,7 @@
     }
 
     // Our state is now consistent
-    g_mutex_unlock (player->mutex);
+    g_mutex_unlock (player->replaygain_mutex);
 
     if (gst_pad_is_blocked (srcPad)) {
         gst_pad_set_blocked_async (srcPad, FALSE, &pad_block_cb, player);
diff -Nur old/libbanshee/banshee-player-video.c new/libbanshee/banshee-player-video.c
--- old/libbanshee/banshee-player-video.c	2010-05-18 01:04:32.000000000 +0800
+++ new/libbanshee/banshee-player-video.c	2010-10-13 12:54:00.000000000 +0800
@@ -42,17 +42,19 @@
     GstElement *video_sink = NULL;
     GstElement *xoverlay;
     GstXOverlay *previous_xoverlay;
+    gboolean    found_xoverlay;
 
-    previous_xoverlay = player->xoverlay;
-    
     g_object_get (player->playbin, "video-sink", &video_sink, NULL);
-    
+
+    g_mutex_lock (player->video_mutex);
+    previous_xoverlay = player->xoverlay;
+
     if (video_sink == NULL) {
         player->xoverlay = NULL;
         if (previous_xoverlay != NULL) {
             gst_object_unref (previous_xoverlay);
         }
-
+        g_mutex_unlock (player->video_mutex);
         return FALSE;
     }
     
@@ -79,8 +81,10 @@
     }
 
     gst_object_unref (video_sink);
+    found_xoverlay = (player->xoverlay != NULL) ? TRUE : FALSE;
 
-    return player->xoverlay != NULL;
+    g_mutex_unlock (player->video_mutex);
+    return found_xoverlay;
 }
 
 #endif /* GDK_WINDOWING_X11 || GDK_WINDOWING_WIN32 */
@@ -91,9 +95,7 @@
     g_return_if_fail (IS_BANSHEE_PLAYER (player));
 
     #if defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_WIN32)
-    g_mutex_lock (player->mutex);
     bp_video_find_xoverlay (player);
-    g_mutex_unlock (player->mutex);    
     #endif
 }
 
@@ -110,9 +112,7 @@
         return;
     }
 
-    g_mutex_lock (player->mutex);
     found_xoverlay = bp_video_find_xoverlay (player);
-    g_mutex_unlock (player->mutex);
 
     if (found_xoverlay) {
         gst_x_overlay_set_xwindow_id (player->xoverlay, player->video_window_xid);
@@ -318,16 +318,12 @@
         gst_x_overlay_expose (player->xoverlay);
         return;
     }
-   
-    g_mutex_lock (player->mutex);
-   
+
     if (player->xoverlay == NULL && !bp_video_find_xoverlay (player)) {
-        g_mutex_unlock (player->mutex);
         return;
     }
     
     gst_object_ref (player->xoverlay);
-    g_mutex_unlock (player->mutex);
 
     gst_x_overlay_set_xwindow_id (player->xoverlay, player->video_window_xid);
     gst_x_overlay_expose (player->xoverlay);
