summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_dxva2egl.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/hwdec_dxva2egl.c')
-rw-r--r--video/out/opengl/hwdec_dxva2egl.c6
1 files changed, 3 insertions, 3 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;
}