mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
segment: also intialize the duration
If start and stop are set, calculate the duration and set it too.
This commit is contained in:
parent
875903be3f
commit
f1baaae175
1 changed files with 6 additions and 0 deletions
|
@ -364,6 +364,12 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
|
|||
segment->offset = 0;
|
||||
}
|
||||
|
||||
if (start != -1 && stop != -1) {
|
||||
segment->duration = stop - start;
|
||||
} else {
|
||||
segment->duration = -1;
|
||||
}
|
||||
|
||||
segment->start = start;
|
||||
segment->stop = stop;
|
||||
segment->time = start;
|
||||
|
|
Loading…
Reference in a new issue