When using a negative rate (rate being segment.rate * segment.applied_rate),
we will end up reporting decreasing positions, therefore adjust the clamping
against last reported value accordingly.
Fixes positions getting properly reported with applied_rate < 0.0
https://bugzilla.gnome.org/show_bug.cgi?id=738092
*cur = time + gst_guint64_to_gdouble (now - base_time) * rate;
/* never report more than last seen position */
- if (last != -1)
- *cur = MIN (last, *cur);
+ if (last != -1) {
+ if (rate > 0.0)
+ *cur = MIN (last, *cur);
+ else
+ *cur = MAX (last, *cur);
+ }
GST_DEBUG_OBJECT (basesink,
"now %" GST_TIME_FORMAT " - base_time %" GST_TIME_FORMAT " - base %"