projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
875903b
)
segment: also intialize the duration
author
Stefan Sauer
<ensonic@users.sf.net>
Fri, 20 Oct 2017 12:30:42 +0000
(14:30 +0200)
committer
Stefan Sauer
<ensonic@users.sf.net>
Fri, 20 Oct 2017 12:30:42 +0000
(14:30 +0200)
If start and stop are set, calculate the duration and set it too.
gst/gstsegment.c
patch
|
blob
|
history
diff --git
a/gst/gstsegment.c
b/gst/gstsegment.c
index
f355d4a
..
f69c6f1
100644
(file)
--- a/
gst/gstsegment.c
+++ b/
gst/gstsegment.c
@@
-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;