summaryrefslogtreecommitdiff
path: root/gst/gstsegment.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/gstsegment.c')
-rw-r--r--gst/gstsegment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/gstsegment.c b/gst/gstsegment.c
index 5ecb2e8e4..e4fd3866c 100644
--- a/gst/gstsegment.c
+++ b/gst/gstsegment.c
@@ -20,6 +20,8 @@
*/
+#include <math.h>
+
#include "gst_private.h"
#include "gstutils.h"
@@ -812,7 +814,7 @@ gst_segment_to_position (GstSegment * segment, GstFormat format,
/* move into the segment at the right rate */
if (G_UNLIKELY (segment->abs_rate != 1.0))
- result *= segment->abs_rate;
+ result = ceil (result * segment->abs_rate);
if (G_LIKELY (segment->rate > 0.0)) {
/* bring to corrected position in segment */