[MPlayer-dev-eng] [PATCH]: vo_gl2 bug fixes

Attila Kinali kinali at gmx.net
Thu Oct 9 20:27:06 CEST 2003


On Sat, 27 Sep 2003 02:34:12 -0700
Ioannis Panteleakis <pioann at csd.auth.gr> wrote:


> with recent commitions of aspect() in the vo_gl2 driver there are two bugs:
> 1) switching to fullscreen the black area is not cleared, so it is not 
> black :)

This is broken for a longer time, dont blame aspect :)

> 2) resizing the window, image coordinates are not updated, so there is no 
> image rescale to window coords

same here...

I both saw them, but didnt care enough to fix it.

> [vo_gl2.c.patch  text/x-diff (1048 bytes)]
> --- vo_gl2_orig.c	2003-09-27 02:16:35.000000000 -0700
> +++ vo_gl2.c	2003-09-27 02:14:08.000000000 -0700
> @@ -1,4 +1,4 @@
> -/* 
> +/*
>   * video_out_gl.c, X11/OpenGL interface
>   * based on video_out_x11 by Aaron Holtzman,
>   * and WS opengl window manager by Pontscho/Fresh!
> @@ -566,11 +566,12 @@
>    printf("[gl2] Resize: %dx%d\n",x,y);
>    if( vo_fs )
>    {
> +      glClear(GL_COLOR_BUFFER_BIT);

looks ok

>  	  aspect(&x, &y, A_ZOOM);
>  	  glViewport( (vo_screenwidth-x)/2, (vo_screenheight-y)/2, x, y);
> -  } else { 
> +  } else {
>  	  aspect(&x, &y, A_NOZOOM);
> -	  glViewport( 0, 0, x, y );
> +	  glViewport(0, 0, vo_dwidth, vo_dheight);

are you sure about this ?
resize is two times called with vo_dwidth/vo_dheight,
once with d_width/d_height.
I think that x and y should be rather int* than int.
I'll have a look at it after i finshed going trough -dev-eng

BTW: you had quite some cosmetic stuff in a 2 lines fix.

				Attila Kinali


-- 
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
			-- reeler in +kaosu



More information about the MPlayer-dev-eng mailing list