gstsegment: Handle positions before the segment properly
authorJan Schmidt <jan@centricular.com>
Thu, 23 Aug 2018 12:34:47 +0000 (22:34 +1000)
committerJan Schmidt <jan@centricular.com>
Mon, 27 Aug 2018 15:54:02 +0000 (01:54 +1000)
commit260b9791fc7ea524ad949b5cfdd81688d0a3013e
treee997beda91d5222e331d790b58905e17701ee9bd
parentf87d38c1865264f338eddfa10d8ba8a31ee9322e
gstsegment: Handle positions before the segment properly

Fixes for gst_segment_position_from_running_time_full() when
converting running_times that precede the segment start (or
stop in a negative rate segment)

The return value was incorrectly negated in those cases.

Add some more unit test checks for those cases, and especially
for segments with offsets.
gst/gstsegment.c
tests/check/gst/gstsegment.c