summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2016-11-17 23:05:17 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2016-11-17 23:34:20 +1100
commit803e2c5f87c2102e67922e04fbae02247b66e790 (patch)
treeed6a3752683939fbc6e8af77d864a48c0d298390 /video
parent40b626fd9b58e2975cff8dec202848a7bce41a9f (diff)
downloadmpv-803e2c5f87c2102e67922e04fbae02247b66e790.tar.bz2
mpv-803e2c5f87c2102e67922e04fbae02247b66e790.tar.xz
win32: fix some Clang warnings
- win32-console-wrapper.c was inconsistently using the explicit Unicode versions of some Windows API functions and structures. - vo.c should use llabs for int64_t, since long is 32-bit on Windows. - vo_direct3d.c had a potential use of an uninitialized variable if it took the first goto error_exit.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c2
-rw-r--r--video/out/vo_direct3d.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 296be634ad..cbd2ca87c8 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -401,7 +401,7 @@ static void vsync_skip_detection(struct vo *vo)
}
int64_t desync = diff / in->num_vsync_samples;
if (in->drop_point > window * 2 &&
- labs(desync - desync_early) >= in->vsync_interval * 3 / 4)
+ llabs(desync - desync_early) >= in->vsync_interval * 3 / 4)
{
// Assume a drop. An underflow can technically speaking not be a drop
// (it's up to the driver what this is supposed to mean), but no reason
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 38dde55af2..c99ea372f6 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1466,13 +1466,13 @@ static mp_image_t *get_window_screenshot(d3d_priv *priv)
POINT pt;
D3DLOCKED_RECT locked_rect;
int width, height;
+ IDirect3DSurface9 *surface = NULL;
if (FAILED(IDirect3DDevice9_GetDisplayMode(priv->d3d_device, 0, &mode))) {
MP_ERR(priv, "GetDisplayMode failed.\n");
goto error_exit;
}
- IDirect3DSurface9 *surface = NULL;
if (FAILED(IDirect3DDevice9_CreateOffscreenPlainSurface(priv->d3d_device,
mode.Width, mode.Height, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &surface,
NULL)))