diff options
author | Jan Schmidt <jan@centricular.com> | 2018-08-27 15:32:01 +0300 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2018-09-11 15:21:09 +0300 |
commit | 769ceac199c58e2ffc3eae7710dd80879ede7535 (patch) | |
tree | b86bafe6b2a03cb93a52a61c8299cb0fe21db0bd | |
parent | 5978e3b9587ddc998ddf5833ef34a915e02a52dd (diff) |
gstsegment: Add check for gst_segment_offset_running_time()
Add a check for gst_segment_offset_running_time() that values
are taken directly from the segment base if possible.
-rw-r--r-- | tests/check/gst/gstsegment.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/check/gst/gstsegment.c b/tests/check/gst/gstsegment.c index f16046279b..17ad18c2ff 100644 --- a/tests/check/gst/gstsegment.c +++ b/tests/check/gst/gstsegment.c @@ -862,6 +862,15 @@ GST_START_TEST (segment_full) GST_DEBUG ("%" G_GUINT64_FORMAT, rt); fail_unless (rt == 50); + /* Forward jump will be applied directly to the base field */ + fail_unless (gst_segment_offset_running_time (&segment, GST_FORMAT_TIME, + 50) == TRUE); + fail_unless (segment.base == 50); + /* Now there's enough base, a negative offset should come from there */ + fail_unless (gst_segment_offset_running_time (&segment, GST_FORMAT_TIME, + -50) == TRUE); + fail_unless (segment.base == 0); + segment.start = 50; segment.stop = 300; segment.position = 150; |