This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-ctl: fix overflow in fps calculation Author: Hans Verkuil <[email protected]> Date: Thu Mar 17 11:06:20 2016 +0100 Use 64 bit instead of 32 for the fps calculation. Signed-off-by: Hans Verkuil <[email protected]> utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=3caa49dd15120bcff3fe6eb63218d5afe47c0860 diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp index cf89f3da1276..b87d53b97571 100644 --- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp @@ -898,10 +898,11 @@ static int do_handle_cap(int fd, buffers &b, FILE *fout, int *index, res.tv_nsec += 1000000000; } if (res.tv_sec > last_sec) { - unsigned fps = (10000 * count) / - (res.tv_sec * 100 + res.tv_nsec / 10000000); + __u64 fps = 10000ULL * count; + + fps /= (__u64)res.tv_sec * 100ULL + (__u64)res.tv_nsec / 10000000ULL; last_sec = res.tv_sec; - fprintf(stderr, " %d.%02d fps\n", fps / 100, fps % 100); + fprintf(stderr, " %llu.%02llu fps\n", fps / 100ULL, fps % 100ULL); } } count++; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
