DVS capture: wait 2x frame time duration

This commit is contained in:
Martin Pulec
2014-01-29 12:53:34 +01:00
parent 1c22efce23
commit 5b09a9fd24

View File

@@ -554,7 +554,7 @@ struct video_frame *vidcap_dvs_grab(void *state, struct audio_frame **audio)
gettimeofday(&tp, NULL);
ts.tv_sec = tp.tv_sec;
ts.tv_nsec = tp.tv_usec * 1000;
ts.tv_nsec += 1000 * 1000 * 1000 / s->frame->fps;
ts.tv_nsec += 2 * 1000 * 1000 * 1000 / s->frame->fps;
// make it correct
ts.tv_sec += ts.tv_nsec / 1000000000;
ts.tv_nsec = ts.tv_nsec % 1000000000;