basesink: use start_time as the step start

Use the start_time of the element as the point from where the step operation
starts. This fixes stepping in all paused states.
This commit is contained in:
Wim Taymans 2009-05-29 16:06:52 +02:00 committed by Wim Taymans
parent 642bb32196
commit 8c54c70d9c

View file

@ -1485,13 +1485,8 @@ start_stepping (GstBaseSink * sink, GstSegment * segment,
memcpy (current, pending, sizeof (GstStepInfo));
pending->valid = FALSE;
/* get the running time of the current segment start and remember it */
if (segment->rate > 0.0)
current->start =
gst_segment_to_running_time (segment, segment->format, segment->start);
else
current->start =
gst_segment_to_running_time (segment, segment->format, segment->stop);
/* get the running time of where we paused and remember it */
current->start = gst_element_get_start_time (GST_ELEMENT_CAST (sink));
/* set the new rate */
segment->rate = segment->rate * current->rate;
@ -1518,7 +1513,6 @@ stop_stepping (GstBaseSink * sink, GstSegment * segment,
GST_DEBUG_OBJECT (sink, "step complete");
/* update the segment, discarding what was consumed, running time goes
* backwards with the duration of the data we skipped. FIXME, this only works
* in PAUSED. */