diff options
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/opengl/hwdec_dxva2egl.c | 6 | ||||
-rw-r--r-- | video/out/vo_null.c | 8 | ||||
-rw-r--r-- | video/out/vo_x11.c | 2 | ||||
-rw-r--r-- | video/out/vo_xv.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c index d870d982cd..0ca10ef7af 100644 --- a/video/out/opengl/hwdec_dxva2egl.c +++ b/video/out/opengl/hwdec_dxva2egl.c @@ -343,7 +343,7 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) // of the above StretchRect. Timeout of 8ms is required to reliably // render 4k on Intel Haswell, Ivybridge and Cherry Trail Atom. const int max_retries = 8; - const int64_t wait_us = 1000; + const int64_t wait_ns = 1e6; int retries = 0; while (true) { hr = IDirect3DQuery9_GetData(p->query9, NULL, 0, D3DGETDATA_FLUSH); @@ -353,10 +353,10 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) } else if (hr == S_FALSE) { if (++retries > max_retries) { MP_VERBOSE(mapper, "Failed to flush frame after %lld ms\n", - (long long)(wait_us * max_retries) / 1000); + (long long)(wait_ns * max_retries) / 1e6); break; } - mp_sleep_us(wait_us); + mp_sleep_ns(wait_ns); } else { break; } diff --git a/video/out/vo_null.c b/video/out/vo_null.c index 2aa46f785f..0c49062e23 100644 --- a/video/out/vo_null.c +++ b/video/out/vo_null.c @@ -40,14 +40,14 @@ static void flip_page(struct vo *vo) { struct priv *p = vo->priv; if (p->cfg_fps) { - int64_t ft = 1e6 / p->cfg_fps; - int64_t prev_vsync = mp_time_us() / ft; + int64_t ft = 1e9 / p->cfg_fps; + int64_t prev_vsync = mp_time_ns() / ft; int64_t target_time = (prev_vsync + 1) * ft; for (;;) { - int64_t now = mp_time_us(); + int64_t now = mp_time_ns(); if (now >= target_time) break; - mp_sleep_us(target_time - now); + mp_sleep_ns(target_time - now); } } } diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 9775b23948..1087fc249e 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -299,7 +299,7 @@ static void wait_for_completion(struct vo *vo, int max_outstanding) " for XShm completion events...\n"); ctx->Shm_Warned_Slow = 1; } - mp_sleep_us(1000); + mp_sleep_ns(1e6); vo_x11_check_events(vo); } } diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 22bce03770..cffd3a797f 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -670,7 +670,7 @@ static void wait_for_completion(struct vo *vo, int max_outstanding) " for XShm completion events...\n"); ctx->Shm_Warned_Slow = 1; } - mp_sleep_us(1000); + mp_sleep_ns(1e6); vo_x11_check_events(vo); } } |