commit 03c35f4547ecdc9724f78704bb4a99309f0b0aa5
Author: Youness Alaoui <youness.alaoui@collabora.co.uk>
Date:   Mon May 27 16:30:45 2013 -0400

    BaseSink: Must preserve invalid start/stop times instead of clipping them to full stream duration

diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index eb3ca1b..6471699 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -1910,8 +1910,10 @@ again:
     segment->position = cstart;
 
 do_times:
-  rstart = gst_segment_to_running_time (segment, format, cstart);
-  rstop = gst_segment_to_running_time (segment, format, cstop);
+  rstart = GST_CLOCK_TIME_IS_VALID (start) ?
+      gst_segment_to_running_time (segment, format, cstart) : start;
+  rstop = GST_CLOCK_TIME_IS_VALID (stop) ?
+      gst_segment_to_running_time (segment, format, cstop) : stop;
 
   if (GST_CLOCK_TIME_IS_VALID (stop))
     rnext = rstop;
@@ -1928,8 +1930,10 @@ do_times:
   }
   /* this can produce wrong values if we accumulated non-TIME segments. If this happens,
    * upstream is behaving very badly */
-  sstart = gst_segment_to_stream_time (segment, format, cstart);
-  sstop = gst_segment_to_stream_time (segment, format, cstop);
+  sstart = GST_CLOCK_TIME_IS_VALID (start) ?
+      gst_segment_to_stream_time (segment, format, cstart) : start;
+  sstop = GST_CLOCK_TIME_IS_VALID (stop) ?
+      gst_segment_to_stream_time (segment, format, cstop) : stop;
 
 eos_done:
   /* eos_done label only called when doing EOS, we also stop stepping then */
