? gstgnomevfssrc.c.diff
Index: gstgnomevfssrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.c,v
retrieving revision 1.90
diff -u -3 -p -b -B -d -r1.90 gstgnomevfssrc.c
--- gstgnomevfssrc.c	11 May 2006 10:33:46 -0000	1.90
+++ gstgnomevfssrc.c	4 Jul 2006 16:18:03 -0000
@@ -90,6 +90,8 @@
 #include <string.h>
 
 #include <gst/gst.h>
+#include <gst/base/gsttypefindhelper.h>
+
 /* gnome-vfs.h doesn't include the following header, which we need: */
 #include <libgnomevfs/gnome-vfs-standard-callbacks.h>
 
@@ -666,6 +668,18 @@ gst_gnome_vfs_src_create (GstBaseSrc * b
 
   src->curoffset += readbytes;
 
+  /* Run typefind on the buffer if it is the first one. */
+  if (!GST_BUFFER_OFFSET (buf)) {
+    GstCaps *caps;
+
+    caps = gst_type_find_helper_for_buffer (GST_OBJECT (src), buf, NULL);
+    if (caps) {
+      gst_buffer_set_caps (buf, caps);
+      gst_pad_set_caps (basesrc->srcpad, caps);
+      gst_caps_unref (caps);
+    }
+  }
+
   /* we're done, return the buffer */
   *buffer = buf;
 
