From 35a35badeb050d53eec590c5d7e08ff753077c35 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 4 Jun 2015 17:08:42 -0700 Subject: [PATCH] libobs: Use clamped video time for async timing When playing back buffered async frames, this reduces the probability that new frames will be missed/skipped due to jitter in the system timestamps. If a buffered async source is playing at the same framerate as the compositor and there is no jitter in the async source's timestamps, then the async source will play back perfectly in sync with the compositor thanks to this change, ensuring that there's no skipped or missed frames in video playback. --- libobs/obs-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index e607c7b97..91b86c845 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -782,7 +782,7 @@ void obs_source_video_tick(obs_source_t *source, float seconds) if (!source) return; if ((source->info.output_flags & OBS_SOURCE_ASYNC) != 0) { - uint64_t sys_time = os_gettime_ns(); + uint64_t sys_time = obs->video.video_time; pthread_mutex_lock(&source->async_mutex); if (source->cur_async_frame) { -- GitLab