Index: gstgiobasesrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.c,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 gstgiobasesrc.c
--- gstgiobasesrc.c	22 Mar 2008 14:13:55 -0000	1.8
+++ gstgiobasesrc.c	9 Jun 2008 09:53:17 -0000
@@ -296,7 +297,8 @@ gst_gio_base_src_create (GstBaseSrc * ba
 {
   GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
   GstBuffer *buf;
-  gssize read;
+  gssize res;
+  gsize read;
   gboolean success, eos;
   GstFlowReturn ret = GST_FLOW_OK;
   GError *err = NULL;
@@ -320,12 +322,16 @@ gst_gio_base_src_create (GstBaseSrc * ba
   GST_LOG_OBJECT (src, "reading %u bytes from offset %" G_GUINT64_FORMAT,
       size, offset);
 
-  read =
-      g_input_stream_read (G_INPUT_STREAM (src->stream), GST_BUFFER_DATA (buf),
-      size, src->cancel, &err);
+  read = 0;
 
-  success = (read >= 0);
-  eos = (size > 0 && read == 0);
+  while (size - read > 0 && (res =
+      g_input_stream_read (G_INPUT_STREAM (src->stream), GST_BUFFER_DATA (buf) + read,
+      size - read, src->cancel, &err)) > 0) {
+      read += res;
+  }
+
+  success = (res >= 0);
+  eos = (size > 0 && res == 0);
 
   if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
     GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
