gstbasesink: Include segment.offset in the computation of position
authorAlicia Boya García <aboya@igalia.com>
Wed, 10 Jan 2018 03:08:57 +0000 (04:08 +0100)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 16 Feb 2018 13:35:14 +0000 (10:35 -0300)
commit65dcb2adbfe8edeaaa0212df2798695f15497b90
tree81513ab7a4cc784717541c2a4c2f5a76ef1ffba0
parent7fad93d03559513c947e38065b1cc160b1621cf6
gstbasesink: Include segment.offset in the computation of position

Position queries with GST_FORMAT_TIME are supposed to return stream
time.

gst_base_sink_get_position() estimates the current stream time on its
own instead of using gst_segment_to_stream_time(), but the algorithm
used was not taking segment.offset into account, resulting in invalid
values when this field was set to a non-zero value.

https://bugzilla.gnome.org/show_bug.cgi?id=792434
libs/gst/base/gstbasesink.c
tests/check/libs/basesink.c