From 160ca3713931893f27e24119c75554d8d642d3e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Nov 2016 18:14:24 +0200 Subject: [PATCH] clock: Fix offsetting of times_temp relative to the times array --- gst/gstclock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst/gstclock.c b/gst/gstclock.c index e17d232..d3534c1 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -739,8 +739,7 @@ gst_clock_init (GstClock * clock) priv->time_index = 0; priv->timeout = DEFAULT_TIMEOUT; priv->times = g_new0 (GstClockTime, 4 * priv->window_size); - priv->times_temp = - priv->times + 2 * priv->window_size * sizeof (GstClockTime); + priv->times_temp = priv->times + 2 * priv->window_size; /* clear floating flag */ gst_object_ref_sink (clock); @@ -1527,8 +1526,7 @@ gst_clock_set_property (GObject * object, guint prop_id, priv->window_size = g_value_get_int (value); priv->window_threshold = MIN (priv->window_threshold, priv->window_size); priv->times = g_renew (GstClockTime, priv->times, 4 * priv->window_size); - priv->times_temp = - priv->times + 2 * priv->window_size * sizeof (GstClockTime); + priv->times_temp = priv->times + 2 * priv->window_size; /* restart calibration */ priv->filling = TRUE; priv->time_index = 0; -- 2.7.4