提交 ef97f15d 编写于 作者: J jp9000

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)
上级 54e80661
...@@ -1676,7 +1676,7 @@ static void obs_source_update_async_video(obs_source_t *source) ...@@ -1676,7 +1676,7 @@ static void obs_source_update_async_video(obs_source_t *source)
source->async_rendered = true; source->async_rendered = true;
if (frame) { if (frame) {
source->timing_adjust = source->timing_adjust =
os_gettime_ns() - frame->timestamp; obs->video.video_time - frame->timestamp;
source->timing_set = true; source->timing_set = true;
if (source->async_update_texture) { if (source->async_update_texture) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册