if (stream->dev->quirks & UVC_QUIRK_INVALID_DEVICE_SOF)
sample.dev_sof = sample.host_sof;
- sample.host_time = uvc_video_get_time();
-
/*
* The UVC specification allows device implementations that can't obtain
* the USB frame number to keep their own frame counters as long as they
(UVC_MIN_HW_TIMESTAMP_DIFF / stream->clock.size))
return;
+ /* This is expensive, only do it if the sample will be added. */
+ sample.host_time = uvc_video_get_time();
+
uvc_video_clock_add_sample(&stream->clock, &sample);
stream->clock.last_sof_processed = sample.dev_sof;
}