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.
This commit is contained in:
parent
0e2b29b365
commit
b120f7cc80
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user