diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c
index cf26b30..7f52b7a 100644
--- a/ext/gnomevfs/gstgnomevfssrc.c
+++ b/ext/gnomevfs/gstgnomevfssrc.c
@@ -146,6 +146,8 @@ static gboolean gst_gnome_vfs_src_query (GstBaseSrc * src, GstQuery * query);
 
 static GstElementClass *parent_class = NULL;
 
+static GStaticRWLock gvfs_lock = G_STATIC_RW_LOCK_INIT;
+
 GType
 gst_gnome_vfs_src_get_type (void)
 {
@@ -565,7 +567,8 @@ gst_gnome_vfs_src_push_callbacks (GstGnomeVFSSrc * src)
 {
   if (src->http_callbacks_pushed)
     return;
-
+   
+  g_static_rw_lock_reader_lock(&gvfs_lock);
   GST_DEBUG_OBJECT (src, "pushing callbacks");
   gnome_vfs_module_callback_push
       (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS,
@@ -573,6 +576,7 @@ gst_gnome_vfs_src_push_callbacks (GstGnomeVFSSrc * src)
   gnome_vfs_module_callback_push
       (GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS,
       gst_gnome_vfs_src_received_headers_callback, src, NULL);
+  g_static_rw_lock_reader_unlock(&gvfs_lock);
 
   src->http_callbacks_pushed = TRUE;
 }
@@ -583,11 +587,13 @@ gst_gnome_vfs_src_pop_callbacks (GstGnomeVFSSrc * src)
   if (!src->http_callbacks_pushed)
     return;
 
+  g_static_rw_lock_reader_lock(&gvfs_lock);
   GST_DEBUG_OBJECT (src, "popping callbacks");
   gnome_vfs_module_callback_pop
       (GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS);
   gnome_vfs_module_callback_pop
       (GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS);
+  g_static_rw_lock_reader_unlock(&gvfs_lock);
 
   src->http_callbacks_pushed = FALSE;
 }
@@ -617,7 +623,9 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
     GST_DEBUG ("need to seek");
     if (src->seekable) {
       GST_DEBUG ("seeking to %" G_GUINT64_FORMAT, offset);
+      g_static_rw_lock_reader_lock(&gvfs_lock);
       res = gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_START, offset);
+      g_static_rw_lock_reader_unlock(&gvfs_lock);
       if (res != GNOME_VFS_OK)
         goto seek_failed;
       src->curoffset = offset;
@@ -637,7 +645,9 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
   todo = size;
   while (todo > 0) {
     /* this can return less that we ask for */
+    g_static_rw_lock_reader_lock(&gvfs_lock);
     res = gnome_vfs_read (src->handle, data, todo, &readbytes);
+    g_static_rw_lock_reader_unlock(&gvfs_lock);
 
     if (G_UNLIKELY (res == GNOME_VFS_ERROR_EOF || (res == GNOME_VFS_OK
                 && readbytes == 0)))
@@ -777,7 +787,8 @@ gst_gnome_vfs_src_get_size (GstBaseSrc * basesrc, guint64 * size)
   GnomeVFSResult res;
 
   src = GST_GNOME_VFS_SRC (basesrc);
-
+  
+  g_static_rw_lock_writer_lock(&gvfs_lock);
   *size = -1;
   info = gnome_vfs_file_info_new ();
   options = GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS;
@@ -801,6 +812,7 @@ gst_gnome_vfs_src_get_size (GstBaseSrc * basesrc, guint64 * size)
         gnome_vfs_result_to_string (res));
   }
   gnome_vfs_file_info_unref (info);
+  g_static_rw_lock_writer_unlock(&gvfs_lock);
 
   if (*size == (GnomeVFSFileSize) - 1)
     return FALSE;
@@ -825,7 +837,9 @@ gst_gnome_vfs_src_start (GstBaseSrc * basesrc)
     GnomeVFSOpenMode mode = GNOME_VFS_OPEN_READ;
 
     /* this can block... */
+    g_static_rw_lock_reader_lock(&gvfs_lock);
     res = gnome_vfs_open_uri (&src->handle, src->uri, mode);
+    g_static_rw_lock_reader_unlock(&gvfs_lock);
     if (res != GNOME_VFS_OK)
       goto open_failed;
     src->own_handle = TRUE;
@@ -835,11 +849,13 @@ gst_gnome_vfs_src_start (GstBaseSrc * basesrc)
     src->own_handle = FALSE;
   }
 
+  g_static_rw_lock_reader_lock(&gvfs_lock);
   if (gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_CURRENT, 0) == GNOME_VFS_OK) {
     src->seekable = TRUE;
   } else {
     src->seekable = FALSE;
   }
+  g_static_rw_lock_reader_unlock(&gvfs_lock);
 
   return TRUE;
 
@@ -884,7 +900,9 @@ gst_gnome_vfs_src_stop (GstBaseSrc * basesrc)
   if (src->own_handle) {
     GnomeVFSResult res;
 
+    g_static_rw_lock_reader_lock(&gvfs_lock);
     res = gnome_vfs_close (src->handle);
+    g_static_rw_lock_reader_unlock(&gvfs_lock);
     if (res != GNOME_VFS_OK) {
       GST_ELEMENT_ERROR (src, RESOURCE, CLOSE, (NULL),
           ("Could not close vfs handle: %s", gnome_vfs_result_to_string (res)));

