segment: fix offset handling with non 0 start
authorWim Taymans <wtaymans@redhat.com>
Wed, 18 Mar 2015 09:53:30 +0000 (10:53 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 18 Mar 2015 10:35:42 +0000 (11:35 +0100)
commit6e67ad7675c3bd00dae00c5aa20647f7e241802a
treee77a97c808da5e8d28d2acf6a73a13b6433b392c
parent78bdbadc4eb3c555d810f0c71cc3c1725749e025
segment: fix offset handling with non 0 start

The position in the segment is relative to the start but the offset
isn't, so subtract the start from the position when setting the offset.
Add unit test for this as well.
gst/gstsegment.c
tests/check/gst/gstsegment.c