[gst-cvs] gstreamer: basesink: use start_time as the step start
Wim Taymans
wtay at kemper.freedesktop.org
Mon Jun 1 04:41:54 PDT 2009
Module: gstreamer
Branch: master
Commit: 8c54c70d9c3a248b5730acd0ae2183ade9e207e8
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=8c54c70d9c3a248b5730acd0ae2183ade9e207e8
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Fri May 29 16:06:52 2009 +0200
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.
---
libs/gst/base/gstbasesink.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index f717209..4b91497 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -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. */
More information about the Gstreamer-commits
mailing list