Index: gst/subparse/gstsubparse.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/subparse/gstsubparse.c,v
retrieving revision 1.33
diff -u -r1.33 gstsubparse.c
--- gst/subparse/gstsubparse.c	17 May 2006 17:49:10 -0000	1.33
+++ gst/subparse/gstsubparse.c	21 May 2006 07:23:53 -0000
@@ -276,9 +276,29 @@
   GST_OBJECT_LOCK (subparse);
   switch (prop_id) {
     case PROP_ENCODING:
+    {
+      gboolean ret;
+      gdouble rate = 1.0;
+
       g_free (subparse->encoding);
       subparse->encoding = g_value_dup_string (value);
+
+      /* Convert that seek to a seeking in bytes at position 0,
+         FIXME: could use an index */
+      ret = gst_pad_push_event (subparse->sinkpad,
+          gst_event_new_seek (rate, GST_FORMAT_BYTES, subparse->segment_flags,
+              GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+      if (ret) {
+        /* prepare that send text applied new encoding */
+        gst_pad_push_event (subparse->srcpad, gst_event_new_new_segment (FALSE,
+                subparse->segment->rate, subparse->segment->format,
+                subparse->segment->last_stop, subparse->segment->stop,
+                subparse->segment->time));
+        subparse->next_offset = 0;
+        subparse->need_segment = TRUE;
+      }
       break;
+    }
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
