mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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:
parent
957e40343d
commit
fa7db7d247
1 changed files with 2 additions and 2 deletions
|
@ -1603,11 +1603,11 @@ handle_stepping (GstBaseSink * sink, GstSegment * segment,
|
||||||
GST_DEBUG_OBJECT (sink, "step ended, we need clipping");
|
GST_DEBUG_OBJECT (sink, "step ended, we need clipping");
|
||||||
step_end = TRUE;
|
step_end = TRUE;
|
||||||
if (segment->rate > 0.0) {
|
if (segment->rate > 0.0) {
|
||||||
*cstart += end - *rstart;
|
|
||||||
*rstart = end;
|
*rstart = end;
|
||||||
|
*cstart = gst_segment_to_position (segment, GST_FORMAT_TIME, end);
|
||||||
} else {
|
} else {
|
||||||
*cstop += *rstop - end;
|
|
||||||
*rstop = end;
|
*rstop = end;
|
||||||
|
*cstop = gst_segment_to_position (segment, GST_FORMAT_TIME, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GST_DEBUG_OBJECT (sink,
|
GST_DEBUG_OBJECT (sink,
|
||||||
|
|
Loading…
Reference in a new issue