summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mnauw@users.sourceforge.net>2013-11-02 15:36:19 +0100
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2013-11-02 16:13:27 +0100
commitebca6aa84f4fbb3163fcafcb8d23893c8617ab18 (patch)
tree922b879d579985984a2dbd6625e0b643c9d392b5
parente10af7c4091ef1efc78443364865311b8b80c434 (diff)
segment: resurrect sanitizing start and stop for seeking
-rw-r--r--gst/gstsegment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/gstsegment.c b/gst/gstsegment.c
index c66342123..5f0ac3343 100644
--- a/gst/gstsegment.c
+++ b/gst/gstsegment.c
@@ -268,7 +268,7 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
if (segment->duration != -1)
start = MIN (start, segment->duration);
else
- start = MAX (start, 0);
+ start = MAX ((gint64) start, 0);
/* stop can be -1 if we have not configured a stop. */
switch (stop_type) {
@@ -292,9 +292,9 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
/* if we have a valid stop time, make sure it is clipped */
if (stop != -1) {
if (segment->duration != -1)
- stop = CLAMP (stop, 0, segment->duration);
+ stop = CLAMP ((gint64) stop, 0, (gint64) segment->duration);
else
- stop = MAX (stop, 0);
+ stop = MAX ((gint64) stop, 0);
}
/* we can't have stop before start */