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:
Jan Schmidt 2009-11-19 19:00:05 +01:00
parent 7537505ed0
commit 81d3fda6e8

View file

@ -4386,7 +4386,7 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
base += accum;
base += latency;
if (GST_CLOCK_DIFF (base, now) < 0)
base = -now;
base = now;
/* for negative rates we need to count back from the segment
* duration. */