From b120f7cc804940ee4041f1d4367bd70976a26155 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 5 Jan 2015 14:07:22 -0800 Subject: [PATCH] libobs: Fix sync bug in new frame handling code The return value of os_sleepto_ns is true if it waited to the specified time, and false if the current time is past the specified time. So it basically returns true if it successfully waited. I just didn't check the return value properly here, so it ended up just setting the count of frames to 1 if overshot, ultimately causing sync issues. --- libobs/obs-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-video.c b/libobs/obs-video.c index 5c7b22fa2..aab5dfeff 100644 --- a/libobs/obs-video.c +++ b/libobs/obs-video.c @@ -486,7 +486,7 @@ static inline void video_sleep(struct obs_core_video *video, uint64_t t = cur_time + interval_ns; int count; - if (!os_sleepto_ns(t)) { + if (os_sleepto_ns(t)) { *p_time = t; count = 1; } else {