mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
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:
parent
642bb32196
commit
8c54c70d9c
1 changed files with 2 additions and 8 deletions
|
@ -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. */
|
||||
|
|
Loading…
Reference in a new issue