Index: ext/gnomevfs/gstgnomevfssrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.c,v
retrieving revision 1.96
diff -u -B -b -p -r1.96 gstgnomevfssrc.c
--- ext/gnomevfs/gstgnomevfssrc.c	26 Jan 2007 12:44:46 -0000	1.96
+++ ext/gnomevfs/gstgnomevfssrc.c	5 Mar 2007 17:11:23 -0000
@@ -770,15 +770,39 @@ static gboolean
 gst_gnome_vfs_src_get_size (GstBaseSrc * basesrc, guint64 * size)
 {
   GstGnomeVFSSrc *src;
+  GnomeVFSFileInfo *info;
+  GnomeVFSFileInfoOptions options;
+  GnomeVFSResult res;
 
   src = GST_GNOME_VFS_SRC (basesrc);
 
-  GST_DEBUG_OBJECT (src, "size %" G_GUINT64_FORMAT, src->size);
+  *size = -1;
+  info = gnome_vfs_file_info_new ();
+  options = GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS;
+  res = gnome_vfs_get_file_info_from_handle (src->handle, info, options);
+  if (res == GNOME_VFS_OK) {
+    if ((info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0) {
+      *size = info->size;
+      GST_DEBUG_OBJECT (src, "from handle: %" G_GUINT64_FORMAT " bytes", *size);
+    } else if (src->own_handle && gnome_vfs_uri_is_local (src->uri)) {
+      GST_DEBUG_OBJECT (src, "file size not known, file local, trying fallback");
+      res = gnome_vfs_get_file_info_uri (src->uri, info, options);
+      if (res == GNOME_VFS_OK &&
+          (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0) {
+        *size = info->size;
+        GST_DEBUG_OBJECT (src, "from uri: %" G_GUINT64_FORMAT " bytes", *size);
+      }
+    }
+  } else {
+    GST_WARNING_OBJECT (src, "getting info failed: %s",
+        gnome_vfs_result_to_string (res));
+  }
+  gnome_vfs_file_info_unref (info);
 
-  if (src->size == (GnomeVFSFileSize) - 1)
-    return FALSE;
+  GST_DEBUG_OBJECT (src, "return size %" G_GUINT64_FORMAT, *size);
 
-  *size = src->size;
+  if (*size == (GnomeVFSFileSize) - 1)
+    return FALSE;
 
   return TRUE;
 }
@@ -787,9 +811,7 @@ gst_gnome_vfs_src_get_size (GstBaseSrc *
 static gboolean
 gst_gnome_vfs_src_start (GstBaseSrc * basesrc)
 {
-  GnomeVFSFileInfoOptions options;
   GnomeVFSResult res;
-  GnomeVFSFileInfo *info;
   GstGnomeVFSSrc *src;
 
   src = GST_GNOME_VFS_SRC (basesrc);
@@ -811,31 +833,6 @@ gst_gnome_vfs_src_start (GstBaseSrc * ba
     src->own_handle = FALSE;
   }
 
-  src->size = (GnomeVFSFileSize) - 1;
-  info = gnome_vfs_file_info_new ();
-  options = GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS;
-  res = gnome_vfs_get_file_info_from_handle (src->handle, info, options);
-  if (res == GNOME_VFS_OK) {
-    if ((info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0) {
-      src->size = info->size;
-      GST_DEBUG_OBJECT (src, "size: %" G_GUINT64_FORMAT " bytes", src->size);
-    } else if (src->own_handle && gnome_vfs_uri_is_local (src->uri)) {
-      GST_DEBUG_OBJECT (src, "file size not known, trying fallback");
-      res = gnome_vfs_get_file_info_uri (src->uri, info, options);
-      if (res == GNOME_VFS_OK &&
-          (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0) {
-        src->size = info->size;
-        GST_DEBUG_OBJECT (src, "size: %" G_GUINT64_FORMAT " bytes", src->size);
-      }
-    }
-    if (src->size == (GnomeVFSFileSize) - 1)
-      GST_DEBUG_OBJECT (src, "file size not known");
-  } else {
-    GST_WARNING_OBJECT (src, "getting info failed: %s",
-        gnome_vfs_result_to_string (res));
-  }
-  gnome_vfs_file_info_unref (info);
-
   if (gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_CURRENT, 0)
       == GNOME_VFS_OK) {
     src->seekable = TRUE;
@@ -887,7 +884,6 @@ gst_gnome_vfs_src_stop (GstBaseSrc * bas
     gnome_vfs_close (src->handle);
     src->handle = NULL;
   }
-  src->size = (GnomeVFSFileSize) - 1;
   src->curoffset = 0;
 
   if (src->icy_caps) {
Index: ext/gnomevfs/gstgnomevfssrc.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.h,v
retrieving revision 1.5
diff -u -B -b -p -r1.5 gstgnomevfssrc.h
--- ext/gnomevfs/gstgnomevfssrc.h	1 Jun 2006 19:19:49 -0000	1.5
+++ ext/gnomevfs/gstgnomevfssrc.h	5 Mar 2007 17:11:23 -0000
@@ -60,7 +60,6 @@ struct _GstGnomeVFSSrc
   gchar *uri_name;
   GnomeVFSHandle *handle;
   gboolean own_handle;
-  GnomeVFSFileSize size;        /* -1 = unknown */
   GnomeVFSFileOffset curoffset; /* current offset in file */
   gboolean seekable;
 
