gst/gstsegment.c: When seeking to stop -1, set last_stop (current position) to the...
authorWim Taymans <wim.taymans@gmail.com>
Fri, 13 Oct 2006 16:09:53 +0000 (16:09 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 13 Oct 2006 16:09:53 +0000 (16:09 +0000)
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek):
When seeking to stop -1, set last_stop (current position) to the
duration of the segment.

ChangeLog
gst/gstsegment.c

index 65db1df..e339366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-10-13  Wim Taymans  <wim@fluendo.com>
 
+       * gst/gstsegment.c: (gst_segment_set_seek):
+       When seeking to stop -1, set last_stop (current position) to the
+       duration of the segment.
+
+2006-10-13  Wim Taymans  <wim@fluendo.com>
+
        * gst/gstelement.h:
        Clarify _NO_PREROLL a bit more.
 
index b639625..00fe9d5 100644 (file)
@@ -351,7 +351,10 @@ gst_segment_set_seek (GstSegment * segment, gdouble rate,
     segment->last_stop = start;
   }
   if (update_stop && rate < 0.0) {
-    segment->last_stop = stop;
+    if (stop == -1)
+      segment->last_stop = segment->duration;
+    else
+      segment->last_stop = stop;
   }
   segment->time = start;
   segment->stop = stop;