From 1b395e65abf4bcaf0ef8bbb25184a1c8a7459a48 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 15 Nov 2016 10:53:49 +0100 Subject: [PATCH] opengl: fix possible typo There isn't a case where program[0] is 0 and program[1] is 0. They are always 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. Signed-off-by: Thomas Guillem --- 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 5cc64a6c1f..75e4a82af1 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -1689,7 +1689,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); -- GitLab