[vlc-commits] opengl: replace runtime check by assertion

Romain Vimont git at videolan.org
Mon Mar 1 17:23:01 UTC 2021


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Feb 26 18:10:31 2021 +0100| [255ee5ffa75c27dcc78f49c665e40f57d63e6aea] | committer: Alexandre Janniaux

opengl: replace runtime check by assertion

If vt->GetAttribLocation() returns -1, there is an error in the shader.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=255ee5ffa75c27dcc78f49c665e40f57d63e6aea
---

 modules/video_output/opengl/filter_draw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/video_output/opengl/filter_draw.c b/modules/video_output/opengl/filter_draw.c
index 885ae957b3..01bd3519ab 100644
--- a/modules/video_output/opengl/filter_draw.c
+++ b/modules/video_output/opengl/filter_draw.c
@@ -149,8 +149,7 @@ vlc_gl_filter_draw_Open(struct vlc_gl_filter *filter,
     sys->program_id = program_id;
 
     sys->loc.vertex_pos = vt->GetAttribLocation(program_id, "vertex_pos");
-    if (sys->loc.vertex_pos == -1)
-        goto error;
+    assert(sys->loc.vertex_pos != -1);
 
     vt->GenBuffers(1, &sys->vbo);
 



More information about the vlc-commits mailing list