diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/hwdec_dxva2egl.c | 4 | ||||
-rw-r--r-- | video/out/vo_x11.c | 2 | ||||
-rw-r--r-- | video/out/vo_xv.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c index acf3ec00c4..979ef59745 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_ns = 1e6; + const int64_t wait_ns = MP_TIME_MS_TO_NS(1); int retries = 0; while (true) { hr = IDirect3DQuery9_GetData(p->query9, NULL, 0, D3DGETDATA_FLUSH); @@ -353,7 +353,7 @@ 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_ns * max_retries) / 1000000); + (long long)MP_TIME_MS_TO_NS(wait_ns * max_retries)); break; } mp_sleep_ns(wait_ns); diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 1087fc249e..fa9315726d 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_ns(1e6); + mp_sleep_ns(MP_TIME_MS_TO_NS(1)); vo_x11_check_events(vo); } } diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index cffd3a797f..6c776c507b 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_ns(1e6); + mp_sleep_ns(MP_TIME_MS_TO_NS(1)); vo_x11_check_events(vo); } } |