segment: Allow stop == -1 in gst_segment_to_running_time() and rate < 0
authorJan Schmidt <jan@centricular.com>
Thu, 20 Sep 2018 13:17:52 +0000 (23:17 +1000)
committerJan Schmidt <jan@centricular.com>
Sun, 28 Oct 2018 17:03:56 +0000 (04:03 +1100)
commit80015d69a778333166f1d45de7341019e2180557
tree7b77ac147b168c51ee8f7848dd52ed6527757325
parent5d115a5d64683bc1e0632efbe90ed1c39f5999bd
segment: Allow stop == -1 in gst_segment_to_running_time() and rate < 0

If a segment has stop == -1, then gst_segment_to_running_time()
would refuse to calculate a running time for negative rates,
but gst_segment_do_seek() allows this scenario and uses a
valid duration for calculations.

Make the 2 functions consistent by using any configured duration
to calculate a running time too in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796559
gst/gstsegment.c
tests/check/gst/gstsegment.c