[vlc-devel] [PATCH 2/2] opengl: fix possible typo
Steve Lhomme
robux4 at gmail.com
Tue Nov 15 10:56:41 CET 2016
On Tue, Nov 15, 2016 at 10:54 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
> There isn't a case where program[0] is 0 and program[1] is 0. They are always
program[1] is *NOT* 0
> created together. So the second part of the if() is never called.
>
> program[0] is for YUV and XYZ sources so it is odd to use it with a single
> planar texture, given that's what program[1] is for.
> ---
> modules/video_output/opengl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
> index 3eba473..abb39c4 100644
> --- a/modules/video_output/opengl.c
> +++ b/modules/video_output/opengl.c
> @@ -1662,7 +1662,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
> }
>
> #ifdef SUPPORTS_SHADERS
> - if (vgl->program[0] && (vgl->chroma->plane_count == 3 || vgl->chroma->plane_count == 1))
> + if (vgl->program[0] && (vgl->chroma->plane_count == 3 || vgl->chroma->plane_count == 2))
> DrawWithShaders(vgl, left, top, right, bottom, 0);
> else if (vgl->program[1] && vgl->chroma->plane_count == 1)
> DrawWithShaders(vgl, left, top, right, bottom, 1);
> --
> 2.10.1
>
More information about the vlc-devel
mailing list