diff --git a/packages/gst-plugins-bad/configure.ac b/packages/gst-plugins-bad/configure.ac
index 6249021..3411f2f 100644
--- a/packages/gst-plugins-bad/configure.ac
+++ b/packages/gst-plugins-bad/configure.ac
@@ -103,6 +103,7 @@ GST_PLUGINS_ALL="\
   rawparse \
   real \
   replaygain \
+  resettime \
   rtpmanager \
   sdp \
   spectrum \
diff --git a/packages/gst-plugins-bad/gst/resettime/Makefile.am b/packages/gst-plugins-bad/gst/resettime/Makefile.am
new file mode 100644
index 0000000..57fc21e
--- /dev/null
+++ b/packages/gst-plugins-bad/gst/resettime/Makefile.am
@@ -0,0 +1,9 @@
+
+plugin_LTLIBRARIES = libgstresettime.la
+
+libgstresettime_la_SOURCES = gstresettime.c
+libgstresettime_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstresettime_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) $(LIBM)
+libgstresettime_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+
+noinst_HEADERS = gstresettime.h
\ No newline at end of file
diff --git a/packages/gst-plugins-bad/gst/resettime/gstresettime.c b/packages/gst-plugins-bad/gst/resettime/gstresettime.c
new file mode 100644
index 0000000..ec33a00
--- /dev/null
+++ b/packages/gst-plugins-bad/gst/resettime/gstresettime.c
@@ -0,0 +1,292 @@
+/* GStreamer Element resettime
+ * Copyright (C) 2008 Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
+ * Based on  element resettime from gentrans:
+ * Copyright (C) 2006 Mark Nauwelaerts <mnauw@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1307, USA.
+ */
+
+/**
+ * SECTION:element-resettime
+ *
+ * <refsect2>
+ * <para>
+ * Subtract a base time from the timestamps of passing buffers.  The base time
+ * is the timestamp of the first buffer passing after <link
+ * linkend="GstResetTime--reset">reset</link> has been written.
+ * </para>
+ * <para>
+ * Passing segment events are also shifted accordingly.
+ * </para>
+ * </refsect2>
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstresettime.h"
+
+#include <string.h>
+
+
+GST_DEBUG_CATEGORY_STATIC (resettime_debug);
+#define GST_CAT_DEFAULT resettime_debug
+
+
+/* signals and args */
+enum
+{
+  /* FILL ME */
+  LAST_SIGNAL
+};
+
+enum
+{
+  PROP_0,
+  PROP_RESET
+      /* FILL ME */
+};
+
+#define DEFAULT_RESET    TRUE
+
+static GstElementDetails resettime_details =
+GST_ELEMENT_DETAILS ("ResetTime",
+    "Generic",
+    "Subtract an offset from passing buffers' timestamps, based on the first.",
+    "Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>");
+
+static GstStaticPadTemplate gst_resettime_src_template =
+GST_STATIC_PAD_TEMPLATE (GST_BASE_TRANSFORM_SRC_NAME,
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY
+    );
+
+static GstStaticPadTemplate gst_resettime_sink_template =
+GST_STATIC_PAD_TEMPLATE (GST_BASE_TRANSFORM_SINK_NAME,
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY
+    );
+
+static gboolean gst_resettime_event (GstBaseTransform * btrans, GstEvent * event);
+
+static GstFlowReturn gst_resettime_transform_ip (GstBaseTransform * btrans,
+    GstBuffer * in);
+static gboolean gst_resettime_start (GstBaseTransform * btrans);
+static gboolean gst_resettime_stop (GstBaseTransform * btrans);
+
+static void gst_resettime_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_resettime_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+GST_BOILERPLATE (GstResetTime, gst_resettime, GstBaseTransform, GST_TYPE_BASE_TRANSFORM);
+
+static void
+gst_resettime_base_init (gpointer g_class)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+  gst_element_class_set_details (element_class, &resettime_details);
+
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_resettime_sink_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_resettime_src_template));
+}
+
+static void
+gst_resettime_class_init (GstResetTimeClass * g_class)
+{
+  GObjectClass *gobject_class;
+  GstBaseTransformClass *trans_class;
+
+  gobject_class = G_OBJECT_CLASS (g_class);
+  trans_class = GST_BASE_TRANSFORM_CLASS (g_class);
+
+  GST_DEBUG_CATEGORY_INIT (resettime_debug, "resettime", 0, "resettime");
+
+  gobject_class->set_property = gst_resettime_set_property;
+  gobject_class->get_property = gst_resettime_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_RESET,
+      g_param_spec_boolean ("reset", "Reset",
+          "Reset the offset to the next buffer's timestamp.",
+          DEFAULT_RESET, G_PARAM_WRITABLE));
+
+  /* not setting passthrough assures (metadata) writable buffers */
+  trans_class->event = GST_DEBUG_FUNCPTR (gst_resettime_event);
+  trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_resettime_transform_ip);
+  trans_class->start = GST_DEBUG_FUNCPTR (gst_resettime_start);
+  trans_class->stop = GST_DEBUG_FUNCPTR (gst_resettime_stop);
+}
+
+static void
+gst_resettime_init (GstResetTime * filter, GstResetTimeClass * g_class)
+{
+  filter->reset = DEFAULT_RESET;
+  filter->offset = GST_CLOCK_TIME_NONE;
+}
+
+static gboolean
+gst_resettime_do_reset (GstResetTime * resettime, guint64 offset)
+{
+  if (resettime->reset) {
+    GST_LOG_OBJECT (resettime,
+        "resetting to offset %" GST_TIME_FORMAT, GST_TIME_ARGS(offset));
+    if (!GST_CLOCK_TIME_IS_VALID(offset)) {
+      GST_INFO_OBJECT (resettime, "resetting to invalid time!");
+    }
+    resettime->offset = offset;
+    resettime->reset = FALSE;
+    return TRUE;
+  } else {
+    return FALSE;
+  }
+}
+
+static gboolean
+gst_resettime_do_offset (GstResetTime * resettime, guint64 *timestamp)
+{
+  if (GST_CLOCK_TIME_IS_VALID (*timestamp) &&
+      GST_CLOCK_TIME_IS_VALID (resettime->offset)) {
+    *timestamp -= resettime->offset;
+    return TRUE;
+  } else {
+    return FALSE;
+  }
+}
+
+static gboolean
+gst_resettime_event (GstBaseTransform * btrans, GstEvent * event)
+{
+  gboolean ret = TRUE;
+  GstResetTime *filter;
+
+  filter = GST_RESETTIME (btrans);
+
+  if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
+    GstFormat format;
+    gboolean update;
+    gdouble rate;
+    gint64 start, stop, pos;
+
+    gst_event_parse_new_segment (event, &update, &rate, &format,
+        &start, &stop, &pos);
+
+    /* shift the segment timestamps */
+    if (format == GST_FORMAT_TIME) {
+      GstEvent *news;
+
+      gst_resettime_do_offset (filter, &start);
+      gst_resettime_do_offset (filter, &stop);
+      gst_resettime_do_offset (filter, &pos);
+      news = gst_event_new_new_segment (update, rate, format, start, stop, pos);
+
+      if (!(gst_pad_event_default (btrans->sinkpad, news)))
+        return FALSE;
+
+      /* don't forward the old newsegment event. */
+      ret = FALSE;
+    } else {
+      GST_INFO_OBJECT(filter, "Wrong format %s for newsegment.",
+                      gst_format_get_name (format));
+    }
+  }
+
+  GST_BASE_TRANSFORM_CLASS (parent_class)->event (btrans, event);
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_resettime_transform_ip (GstBaseTransform * btrans, GstBuffer * in)
+{
+  GstResetTime *filter;
+
+  filter = GST_RESETTIME (btrans);
+
+  gst_resettime_do_reset  (filter, GST_BUFFER_TIMESTAMP (in));
+  gst_resettime_do_offset (filter, &GST_BUFFER_TIMESTAMP (in));
+
+  return GST_FLOW_OK;
+}
+
+
+static gboolean
+gst_resettime_start (GstBaseTransform * btrans)
+{
+  return TRUE;
+}
+
+static gboolean
+gst_resettime_stop (GstBaseTransform * btrans)
+{
+  return TRUE;
+}
+
+static void
+gst_resettime_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstResetTime *src;
+
+  g_return_if_fail (GST_IS_RESETTIME (object));
+  src = GST_RESETTIME (object);
+
+  switch (prop_id) {
+    case PROP_RESET:
+      src->reset = g_value_get_boolean (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_resettime_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstResetTime *src;
+
+  g_return_if_fail (GST_IS_RESETTIME (object));
+  src = GST_RESETTIME (object);
+
+  switch (prop_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (resettime_debug, "resettime", 0, "reset time element");
+
+  return gst_element_register (plugin, "resettime", GST_RANK_NONE, GST_TYPE_RESETTIME);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    "resettime",
+    "Subtract an offset from passing buffers' timestamps, based on the first.",
+    plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
diff --git a/packages/gst-plugins-bad/gst/resettime/gstresettime.h b/packages/gst-plugins-bad/gst/resettime/gstresettime.h
new file mode 100644
index 0000000..7efbb11
--- /dev/null
+++ b/packages/gst-plugins-bad/gst/resettime/gstresettime.h
@@ -0,0 +1,64 @@
+/* GStreamer Element resettime
+ * Copyright (C) 2008 Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
+ * Based on  element shift from gentrans:
+ * Copyright (C) 2006 Mark Nauwelaerts <mnauw@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1307, USA.
+ */
+
+#ifndef __GST_RESETTIME_H__
+#define __GST_RESETTIME_H__
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_RESETTIME \
+  (gst_resettime_get_type())
+#define GST_RESETTIME(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RESETTIME,GstResetTime))
+#define GST_RESETTIME_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RESETTIME,GstResetTimeClass))
+#define GST_IS_RESETTIME(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RESETTIME))
+#define GST_IS_RESETTIME_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RESETTIME))
+
+typedef struct _GstResetTime GstResetTime;
+typedef struct _GstResetTimeClass GstResetTimeClass;
+
+struct _GstResetTime
+{
+  GstBaseTransform parent;
+
+  guint64   offset;
+  GstFormat format;
+
+  /* properties */
+  gboolean  reset;
+};
+
+
+struct _GstResetTimeClass
+{
+  GstBaseTransformClass parent_class;
+};
+
+
+G_END_DECLS
+
+#endif /* __GST_RESETTIME_H__ */
