Closed PeterPeterPan closed 4 years ago
Oh, actually dwClockFrequency is obsolete in UVC 1.1 right?
OK, it's work now 🤣
inline int64_t get_dev_time_us(uvc_stream_handle_t *strmh, int64_t dev_ticks)
{
int64_t time_us;
if (strmh->corrected_clock_freq != 0)
time_us = ((int64_t)dev_ticks * MILLION + (strmh->corrected_clock_freq >> 1)) / strmh->corrected_clock_freq;
else // UVC 1.1, swClockFrequency is obsolete.
time_us = 0;
return time_us;
}
Hi, anyone still here~
When I use the device with UVC 1.0, it's good.
When I use the device with UVC 1.1, the first time call function get_dev_time_us( ), the parameter "strmh->corrected_clock_freq" is zero, that cause "Integer division by zero".
Any idea for this question? why be zero? how to fix?
thanks