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)
This commit is contained in:
parent
54e80661b6
commit
ef97f15d6b
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user