summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-14 21:29:40 +0200
committerwm4 <wm4@nowhere>2014-06-14 21:29:40 +0200
commitdfd93a108c4049c0fd93eb88ab5c410202d1ed78 (patch)
tree4d055294f8b3875ac1ccdf35b5b6ec33139181a2 /stream
parent1d920047ab78eef201b121a4290836b543cd4078 (diff)
downloadmpv-dfd93a108c4049c0fd93eb88ab5c410202d1ed78.tar.bz2
mpv-dfd93a108c4049c0fd93eb88ab5c410202d1ed78.tar.xz
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.
Diffstat (limited to 'stream')
-rw-r--r--stream/tvi_v4l2.c4
1 files 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;