mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
basesink: Clamp the base time correctly in position reporting
When clamping the base time, correctly use 'now', instead of '-now' - the intent is to prevent 'now-base' ever being negative, which would cause a position report outside the segment. Fixes: #602419
This commit is contained in:
parent
7537505ed0
commit
81d3fda6e8
1 changed files with 1 additions and 1 deletions
|
@ -4386,7 +4386,7 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
|
||||||
base += accum;
|
base += accum;
|
||||||
base += latency;
|
base += latency;
|
||||||
if (GST_CLOCK_DIFF (base, now) < 0)
|
if (GST_CLOCK_DIFF (base, now) < 0)
|
||||||
base = -now;
|
base = now;
|
||||||
|
|
||||||
/* for negative rates we need to count back from the segment
|
/* for negative rates we need to count back from the segment
|
||||||
* duration. */
|
* duration. */
|
||||||
|
|
Loading…
Reference in a new issue