Commit 4aeac4b5 authored by Jan Schmidt's avatar Jan Schmidt

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.
parent 260b9791
...@@ -862,6 +862,15 @@ GST_START_TEST (segment_full) ...@@ -862,6 +862,15 @@ GST_START_TEST (segment_full)
GST_DEBUG ("%" G_GUINT64_FORMAT, rt); GST_DEBUG ("%" G_GUINT64_FORMAT, rt);
fail_unless (rt == 50); 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.start = 50;
segment.stop = 300; segment.stop = 300;
segment.position = 150; segment.position = 150;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment