gst/gstsegment.c: Improve some comment.

Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_to_stream_time):
Improve some comment.
Update variables where it makes more sense.
This commit is contained in:
Wim Taymans 2008-02-29 15:22:34 +00:00
parent 99867e9f16
commit 4203512af9
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstsegment.c: (gst_segment_set_seek),
(gst_segment_to_stream_time):
Improve some comment.
Update variables where it makes more sense.
2008-02-29 Rene Stadler <mail@renestadler.de> 2008-02-29 Rene Stadler <mail@renestadler.de>
* gst/gsturi.c: (gst_uri_handler_get_protocols): * gst/gsturi.c: (gst_uri_handler_get_protocols):

View file

@ -362,6 +362,9 @@ gst_segment_set_seek (GstSegment * segment, gdouble rate,
segment->applied_rate = 1.0; segment->applied_rate = 1.0;
segment->flags = flags; segment->flags = flags;
segment->start = start; segment->start = start;
segment->stop = stop;
segment->time = start;
last_stop = segment->last_stop; last_stop = segment->last_stop;
if (update_start && rate > 0.0) { if (update_start && rate > 0.0) {
last_stop = start; last_stop = start;
@ -382,9 +385,6 @@ gst_segment_set_seek (GstSegment * segment, gdouble rate,
/* update new position */ /* update new position */
segment->last_stop = last_stop; segment->last_stop = last_stop;
segment->time = start;
segment->stop = stop;
} }
/** /**
@ -574,7 +574,9 @@ gst_segment_to_stream_time (GstSegment * segment, GstFormat format,
/* correct for segment time */ /* correct for segment time */
result += time; result += time;
} else { } else {
/* correct for segment time, clamp at 0 */ /* correct for segment time, clamp at 0. Streams with a negative
* applied_rate have timestamps between start and stop, as usual, but have
* the time member starting high and going backwards. */
if (time > result) if (time > result)
result = time - result; result = time - result;
else else