libs/gst/base/gstbasesink.c: The reported position must always be smaller than the last seen timestamps (or timestamp...

Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_get_position):
The reported position must always be smaller than the last seen
timestamps (or timestamp + duration for reverse).
This commit is contained in:
Wim Taymans 2008-05-30 15:48:52 +00:00
parent 9f9422bcb3
commit a866e9d33b
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,10 @@
2008-05-30 Wim Taymans <wim.taymans@collabora.co.uk>
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_get_position):
The reported position must always be smaller than the last seen
timestamps (or timestamp + duration for reverse).
2008-05-30 Sebastian Dröge <slomo@circular-chaos.org> 2008-05-30 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Rob Bradford <rob at robster dot org dot uk> Patch by: Rob Bradford <rob at robster dot org dot uk>

View file

@ -3168,12 +3168,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
*cur = time + gst_guint64_to_gdouble (now - base) * rate; *cur = time + gst_guint64_to_gdouble (now - base) * rate;
/* never report more than last seen position */ /* never report more than last seen position */
if (last != -1) { if (last != -1)
if (rate < 0.0)
*cur = MIN (last, *cur); *cur = MIN (last, *cur);
else
*cur = MAX (last, *cur);
}
gst_object_unref (clock); gst_object_unref (clock);