mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gstsegment: Fix unit test and add an additional test
The previous test assumed that start=stop=segment_start will be inside the segment but this is wrong.
This commit is contained in:
parent
ca8a0376c5
commit
868538945b
1 changed files with 8 additions and 3 deletions
|
@ -73,12 +73,17 @@ GST_START_TEST (segment_seek_nosize)
|
|||
fail_unless (cstart == 100);
|
||||
fail_unless (cstop == 150);
|
||||
|
||||
/* special case, 0 duration */
|
||||
/* special case, 0 duration and touching lower bound */
|
||||
res = gst_segment_clip (&segment, GST_FORMAT_BYTES,
|
||||
100, 100, &cstart, &cstop);
|
||||
fail_unless (res == FALSE);
|
||||
|
||||
/* special case, 0 duration and inside the segment */
|
||||
res = gst_segment_clip (&segment, GST_FORMAT_BYTES,
|
||||
120, 120, &cstart, &cstop);
|
||||
fail_unless (res == TRUE);
|
||||
fail_unless (cstart == 100);
|
||||
fail_unless (cstop == 100);
|
||||
fail_unless (cstart == 120);
|
||||
fail_unless (cstop == 120);
|
||||
|
||||
/* completely inside */
|
||||
res = gst_segment_clip (&segment, GST_FORMAT_BYTES,
|
||||
|
|
Loading…
Reference in a new issue