aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-23 14:10:38 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-04-24 14:43:24 +0200
commit222e1760c78f6a65b9702f9c6064e500a39906fa (patch)
tree7c9ed734d3a897dea95b1f24f5fb027fad61e018 /utils/v4l2-ctl/v4l2-ctl-streaming.cpp
parentc71e51f4b05131a093f285faee89aae00b003629 (diff)
utils: fix implicit float conversions
Found with -Wfloat-conversion Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/v4l2-ctl/v4l2-ctl-streaming.cpp')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 066a336a..6981a3cc 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -569,7 +569,7 @@ static void print_concise_buffer(FILE *f, cv4l_buffer &buf, cv4l_fmt &fmt,
if (!skip_ts && (buf.g_flags() & V4L2_BUF_FLAG_TIMESTAMP_MASK) != V4L2_BUF_FLAG_TIMESTAMP_COPY) {
double ts = buf.g_timestamp().tv_sec + buf.g_timestamp().tv_usec / 1000000.0;
fprintf(f, " ts: %.06f", ts);
- if (last_ts)
+ if (last_ts <= 0.0)
fprintf(f, " delta: %.03f ms", (ts - last_ts) * 1000.0);
last_ts = ts;

Privacy Policy