From ef97f15d6b2c7ae04b4c77958d3f6fe4198b566a Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 28 Sep 2017 06:23:19 -0700 Subject: [PATCH] libobs: Set video timing_adjust to obs video time When an async video frame comes in and it sets the timing_adjust value (used to sync audio to video based upon their timestamps), it would use os_gettime_ns as a base. Instead, it should use OBS' current video frame time so that the audio and video playback is as accurate as possible relative to the actual exact timestamp of the video frame. (Results are almost insignificant, but it's nice to be as precise as possible) --- 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 5487b4668..2f33f0bbd 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -1676,7 +1676,7 @@ static void obs_source_update_async_video(obs_source_t *source) source->async_rendered = true; if (frame) { source->timing_adjust = - os_gettime_ns() - frame->timestamp; + obs->video.video_time - frame->timestamp; source->timing_set = true; if (source->async_update_texture) { -- GitLab