mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
segment: Added unit tests for gst_segment_position_from_stream_time
This commit is contained in:
parent
26ef44f17c
commit
572c7c6b9a
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,7 @@ static void
|
|||
check_times (GstSegment * segment, guint64 position, guint64 stream_time,
|
||||
guint64 running_time)
|
||||
{
|
||||
guint64 st, rt;
|
||||
guint64 st, rt, pos;
|
||||
|
||||
st = gst_segment_to_stream_time (segment, segment->format, position);
|
||||
rt = gst_segment_to_running_time (segment, segment->format, position);
|
||||
|
@ -35,6 +35,10 @@ check_times (GstSegment * segment, guint64 position, guint64 stream_time,
|
|||
|
||||
fail_unless_equals_int64 (st, stream_time);
|
||||
fail_unless_equals_int64 (rt, running_time);
|
||||
if (stream_time != -1) {
|
||||
pos = gst_segment_position_from_stream_time (segment, segment->format, st);
|
||||
fail_unless_equals_int64 (pos, position);
|
||||
}
|
||||
}
|
||||
|
||||
/* mess with the segment structure in the bytes format */
|
||||
|
|
Loading…
Reference in a new issue