[vlc-devel] Mac OS X blank white screen problem with fix

Juha Jeronen juha.jeronen at jyu.fi
Thu Jan 20 22:28:01 CET 2011


Hi,

On 01/20/2011 10:48 PM, Scott Herscher wrote:
> The last couple of months on OS X there has been a blank white screen where video should be playing.  This diff has the fix.
>
> --- a/modules/video_output/opengl.c
> +++ b/modules/video_output/opengl.c
> @@ -268,7 +268,7 @@ int vout_display_opengl_ResetTextures(vout_display_opengl_t *vgl)
>
>           /* Call glTexImage2D only once, and use glTexSubImage2D later */
>           if (vgl->buffer[i]) {
> -            glTexImage2D(VLCGL_TARGET, 0, VLCGL_FORMAT, vgl->tex_width,
> +            glTexImage2D(VLCGL_TARGET, 0, 3 /* VLCGL_FORMAT */, vgl->tex_width,
>                            vgl->tex_height, 0, VLCGL_FORMAT, VLCGL_TYPE,
>                            vgl->buffer[i]);
>           }
>
>
> I sadly am not enough of a OpenGL expert to know why the old code was wrong...but it was wrong. At least on Mac OS X it was wrong.  If the maintainers of the code could integrate this fix or find out why it wasn't working correctly I'd be very grateful.
>    

I'm not an OpenGL expert either, but judging by the diff and the 
#defines near the beginning of the file, could this have something to do 
with it?

---8<---8<---8<---

/* OS X OpenGL supports YUV. Hehe. */
# define VLCGL_FORMAT GL_YCBCR_422_APPLE
# define VLCGL_TYPE   GL_UNSIGNED_SHORT_8_8_APPLE

---8<---8<---8<---

Maybe this functionality has become broken in OS X 10.6.5? What happens 
if we, instead of the two lines above, do

# define VLCGL_RGB_FORMAT GL_RGBA
# define VLCGL_RGB_TYPE GL_UNSIGNED_BYTE

# define VLCGL_FORMAT VLCGL_RGB_FORMAT
# define VLCGL_TYPE   VLCGL_RGB_TYPE

on OS X, too?

  -J




More information about the vlc-devel mailing list