# HG changeset patch # User reimar # Date 1370802804 0 # Node ID 5bff1fc3e7e5f10fbe0a508b865e8abe97412bbf # Parent e597260febade1ffbeb8dc448da0d77a1e85d660 vo_gl_tiled: ensure variables are always initialized. This applies in particular if the backend isn't X11 or W32. diff -r e597260febad -r 5bff1fc3e7e5 libvo/vo_gl_tiled.c --- a/libvo/vo_gl_tiled.c Sun Jun 09 18:33:23 2013 +0000 +++ b/libvo/vo_gl_tiled.c Sun Jun 09 18:33:24 2013 +0000 @@ -102,6 +102,7 @@ static GLint getInternalFormat(void) { + r_sz = g_sz = b_sz = a_sz = 0; switch (glctx.type) { #ifdef CONFIG_GL_WIN32 case GLTYPE_W32: @@ -109,9 +110,7 @@ PIXELFORMATDESCRIPTOR pfd; HDC vo_hdc = vo_w32_get_dc(vo_w32_window); int pf = GetPixelFormat(vo_hdc); - if (!DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { - r_sz = g_sz = b_sz = a_sz = 0; - } else { + if (DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { r_sz = pfd.cRedBits; g_sz = pfd.cGreenBits; b_sz = pfd.cBlueBits;