aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-27 12:58:38 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-27 12:58:38 +0100
commit50b900640bab942f4f2504223680ac7d72d16e8b (patch)
tree0c93ff7848f14620ccc7e6f391796e2b37b529c1
parent12d47944e2760e3af7028b4484ef15b0c0763a81 (diff)
v4l2-ctl: fix incorrect check for last_tsHEADmaster
The 'fix implicit float conversions' patch broke logging of the delta value while streaming. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 222e1760 ("utils: fix implicit float conversions") Reported-by: Max Schulze <max.schulze@posteo.de>
-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 a3580595..50c7fd03 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -555,7 +555,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 <= 0.0)
+ if (last_ts != 0.0)
fprintf(f, " delta: %.03f ms", (ts - last_ts) * 1000.0);
last_ts = ts;

Privacy Policy