提交 35a35bad 编写于 作者: J jp9000

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.
上级 51dd204c
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册