gst/gstsegment.c: When seeking to stop -1, set last_stop (current position) to the duration of the segment.

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.
This commit is contained in:
Wim Taymans 2006-10-13 16:09:53 +00:00
parent 1b417192e6
commit df08b4b762
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
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:

View 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;