mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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:
parent
3240b05cec
commit
a7d3df3763
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue