mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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:
parent
9f9422bcb3
commit
a866e9d33b
2 changed files with 9 additions and 6 deletions
|
@ -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>
|
||||
|
||||
Patch by: Rob Bradford <rob at robster dot org dot uk>
|
||||
|
|
|
@ -3168,12 +3168,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
|
|||
*cur = time + gst_guint64_to_gdouble (now - base) * rate;
|
||||
|
||||
/* never report more than last seen position */
|
||||
if (last != -1) {
|
||||
if (rate < 0.0)
|
||||
*cur = MIN (last, *cur);
|
||||
else
|
||||
*cur = MAX (last, *cur);
|
||||
}
|
||||
if (last != -1)
|
||||
*cur = MIN (last, *cur);
|
||||
|
||||
gst_object_unref (clock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue