[MPlayer-cvslog] r36318 - trunk/libvo/vo_gl_tiled.c
reimar
subversion at mplayerhq.hu
Sun Jun 9 20:33:25 CEST 2013
Author: reimar
Date: Sun Jun 9 20:33:24 2013
New Revision: 36318
Log:
vo_gl_tiled: ensure variables are always initialized.
This applies in particular if the backend isn't X11 or W32.
Modified:
trunk/libvo/vo_gl_tiled.c
Modified: trunk/libvo/vo_gl_tiled.c
==============================================================================
--- trunk/libvo/vo_gl_tiled.c Sun Jun 9 20:33:23 2013 (r36317)
+++ trunk/libvo/vo_gl_tiled.c Sun Jun 9 20:33:24 2013 (r36318)
@@ -102,6 +102,7 @@ struct TexSquare
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 @@ static GLint getInternalFormat(void)
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;
More information about the MPlayer-cvslog
mailing list