Index: gst/asfdemux/gstasfdemux.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-ugly/gst/asfdemux/gstasfdemux.c,v
retrieving revision 1.96
diff -u -r1.96 gstasfdemux.c
--- gst/asfdemux/gstasfdemux.c	1 Mar 2006 09:55:49 -0000	1.96
+++ gst/asfdemux/gstasfdemux.c	26 Mar 2006 16:45:17 -0000
@@ -828,6 +828,7 @@
   stream->frag_offset = 0;
   stream->sequence = 0;
   stream->delay = 0;
+  stream->first_pts = GST_CLOCK_TIME_NONE;
   stream->last_pts = GST_CLOCK_TIME_NONE;
   stream->fps_known = !is_video;        /* bit hacky for audio */
   stream->is_video = is_video;
@@ -1812,7 +1813,9 @@
   if (segment_info->frag_offset == 0) {
     /* new packet */
     stream->sequence = segment_info->sequence;
-    demux->pts = segment_info->frag_timestamp - demux->preroll;
+    if (!GST_CLOCK_TIME_IS_VALID (stream->first_pts))
+      stream->first_pts = segment_info->frag_timestamp - demux->preroll;
+    demux->pts = segment_info->frag_timestamp - demux->preroll - stream->first_pts;
 
     /*
        if (stream->is_video) {
@@ -1871,7 +1874,7 @@
 #endif
         stream->frag_offset = 0;
       }
-      demux->pts = segment_info->frag_timestamp - demux->preroll;
+      demux->pts = segment_info->frag_timestamp - demux->preroll - stream->first_pts;
 
       /*
          if (stream->is_video) {
Index: gst/asfdemux/gstasfdemux.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-ugly/gst/asfdemux/gstasfdemux.h,v
retrieving revision 1.18
diff -u -r1.18 gstasfdemux.h
--- gst/asfdemux/gstasfdemux.h	15 Feb 2006 15:48:07 -0000	1.18
+++ gst/asfdemux/gstasfdemux.h	26 Mar 2006 16:45:17 -0000
@@ -47,6 +47,7 @@
   guint32     frag_offset;
   guint32     sequence;
   guint64     delay;
+  guint64     first_pts;
   guint64     last_pts;
   GstBuffer  *payload;
 
