--- gst/elements/gstfdsrc.c.orig	2004-05-20 23:07:12.000000000 -0400
+++ gst/elements/gstfdsrc.c	2004-05-20 23:41:22.000000000 -0400
@@ -73,6 +73,8 @@
 static void gst_fdsrc_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 
+static GstElementStateReturn gst_fdsrc_change_state (GstElement * element);
+
 static GstData *gst_fdsrc_get (GstPad * pad);
 
 
@@ -87,6 +89,7 @@
 gst_fdsrc_class_init (GstFdSrcClass * klass)
 {
   GObjectClass *gobject_class;
+  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
 
   gobject_class = G_OBJECT_CLASS (klass);
 
@@ -108,6 +111,8 @@
 
   gobject_class->set_property = gst_fdsrc_set_property;
   gobject_class->get_property = gst_fdsrc_get_property;
+
+  gstelement_class->change_state = gst_fdsrc_change_state;
 }
 
 static void
@@ -125,6 +130,31 @@
   fdsrc->seq = 0;
 }
 
+static GstElementStateReturn
+gst_fdsrc_change_state (GstElement * element)
+{
+  GstFdSrc *src = GST_FDSRC (element);
+
+  switch (GST_STATE_TRANSITION (element)) {
+    case GST_STATE_NULL_TO_READY:
+      break;
+    case GST_STATE_READY_TO_NULL:
+      break;
+    case GST_STATE_READY_TO_PAUSED:
+      src->curoffset = 0;
+      break;
+    case GST_STATE_PAUSED_TO_READY:
+      break;
+    default:
+      break;
+  }
+
+  if (GST_ELEMENT_CLASS (parent_class)->change_state)
+    return GST_ELEMENT_CLASS (parent_class)->change_state (element);
+
+  return GST_STATE_SUCCESS;
+}
+
 
 static void
 gst_fdsrc_set_property (GObject * object, guint prop_id, const GValue * value,
