basesink: fix clipped start/stop after step

Use the segment helpers to get a more accurate clipped start/stop position after
a stepping operation ended.
This commit is contained in:
Wim Taymans 2009-06-04 17:27:03 +02:00
parent 957e40343d
commit fa7db7d247

View file

@ -1603,11 +1603,11 @@ handle_stepping (GstBaseSink * sink, GstSegment * segment,
GST_DEBUG_OBJECT (sink, "step ended, we need clipping");
step_end = TRUE;
if (segment->rate > 0.0) {
*cstart += end - *rstart;
*rstart = end;
*cstart = gst_segment_to_position (segment, GST_FORMAT_TIME, end);
} else {
*cstop += *rstop - end;
*rstop = end;
*cstop = gst_segment_to_position (segment, GST_FORMAT_TIME, end);
}
}
GST_DEBUG_OBJECT (sink,