nvfbc: fix scaled monitor capture not working correctly

This commit is contained in:
dec05eba
2025-12-08 02:53:29 +01:00
parent 2c53638bb0
commit 5906a0c06f
2 changed files with 2 additions and 1 deletions

View File

@@ -3661,6 +3661,7 @@ int main(int argc, char **argv) {
audio_device.frame->pts += audio_track.codec_context->frame_size;
num_received_frames++;
} else {
// TODO: Maybe sleep for time_to_sleep_until_next_frame/4? for better latency
const double time_after_read_seconds = clock_get_monotonic_seconds();
const double time_to_read_seconds = time_after_read_seconds - time_before_read_seconds;
const double time_to_sleep_until_next_frame = timeout_sec - time_to_read_seconds;