linux-v4l2: Fix timeout logging

The timeout_usec variable is uint64_t, but the log format was set to %ld
(signed long int), so it would sometimes log a nonsensical value. Let's
use $PRIu64 instead, which should be equivalent to %llu (unsigned long
long int).

Fixes #5797.
This commit is contained in:
Ryan Foster 2022-01-14 20:45:40 -05:00 committed by Jim
parent 3240b05cec
commit a7d3df3763

View file

@ -189,7 +189,8 @@ static void *v4l2_thread(void *vptr)
blog(LOG_DEBUG, "%s: framerate: %.2f fps", data->device_id, ffps);
/* Timeout set to 5 frame periods. */
timeout_usec = (1000000 * data->timeout_frames) / ffps;
blog(LOG_INFO, "%s: select timeout set to %ldus (%dx frame periods)",
blog(LOG_INFO,
"%s: select timeout set to %" PRIu64 " (%dx frame periods)",
data->device_id, timeout_usec, data->timeout_frames);
if (v4l2_start_capture(data->dev, &data->buffers) < 0)