From dfd93a108c4049c0fd93eb88ab5c410202d1ed78 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Jun 2014 21:29:40 +0200 Subject: tv: remove some non-sense There's really no need to convert this to float and then back. This is mostly of cosmetic nature, double precision was probably enough to avoid rounding. --- stream/tvi_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index 979457e21e..df3f971584 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -1550,10 +1550,10 @@ static void *video_grabber(void *data) /* store the timestamp of the very first frame as reference */ if (!priv->frames++) { if (priv->tv_param->audio) pthread_mutex_lock(&priv->skew_mutex); - priv->first_frame = (long long)1e6*buf.timestamp.tv_sec + buf.timestamp.tv_usec; + priv->first_frame = buf.timestamp.tv_sec * 1000000LL + buf.timestamp.tv_usec; if (priv->tv_param->audio) pthread_mutex_unlock(&priv->skew_mutex); } - priv->curr_frame = (long long)buf.timestamp.tv_sec*1e6+buf.timestamp.tv_usec; + priv->curr_frame = buf.timestamp.tv_sec * 1000000LL + buf.timestamp.tv_usec; // fprintf(stderr, "idx = %d, ts = %f\n", buf.index, (double)(priv->curr_frame) / 1e6); interval = priv->curr_frame - priv->first_frame; -- cgit v1.2.3