浏览代码

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)
jp9000 8 年之前
父节点
当前提交
ef97f15d6b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libobs/obs-source.c

+ 1 - 1
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) {