From 84f9a042729ca76b3b56e824fede202cc6d2897b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 23 Dec 2023 12:40:16 +0100 Subject: Small changes who cares --- src/capture/nvfbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/capture') diff --git a/src/capture/nvfbc.c b/src/capture/nvfbc.c index 5b62310..e6ee1a9 100644 --- a/src/capture/nvfbc.c +++ b/src/capture/nvfbc.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -297,7 +298,7 @@ static int gsr_capture_nvfbc_start(gsr_capture *cap, AVCodecContext *video_codec if(capture_region) create_capture_params.captureBox = (NVFBC_BOX){ x, y, width, height }; create_capture_params.eTrackingType = tracking_type; - create_capture_params.dwSamplingRateMs = 1000u / ((uint32_t)cap_nvfbc->params.fps + 1); + create_capture_params.dwSamplingRateMs = (uint32_t)ceilf(1000.0f / (float)cap_nvfbc->params.fps); create_capture_params.bAllowDirectCapture = direct_capture ? NVFBC_TRUE : NVFBC_FALSE; create_capture_params.bPushModel = direct_capture ? NVFBC_TRUE : NVFBC_FALSE; //create_capture_params.bDisableAutoModesetRecovery = true; // TODO: -- cgit v1.2.3