diff options
author | wm4 <wm4@nowhere> | 2016-03-28 16:13:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-28 16:13:56 +0200 |
commit | fb70819048eee417a4c666199ede35db820d51f5 (patch) | |
tree | 56bf72ed9111381fc114ef39193a4c967e84b9bf | |
parent | c51fe7944d97d79af5c73c38e415af2332e529ff (diff) | |
download | mpv-fb70819048eee417a4c666199ede35db820d51f5.tar.bz2 mpv-fb70819048eee417a4c666199ede35db820d51f5.tar.xz |
vo_opengl: don't upload potentially uninitialized memory to GL buffer
If the texture count is lower than 4, entries in va.textcoord[] will
remain uninitialized. While this is unlikely to be a problem (since
these values are unused on the shader side too), it's not nice and might
explain some things which have shown up in valgrind.
Fix by always initializing the whole thing.
-rw-r--r-- | video/out/opengl/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 41a1110661..1aec820bd0 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -966,7 +966,7 @@ static void pass_prepare_src_tex(struct gl_video *p) static void render_pass_quad(struct gl_video *p, int vp_w, int vp_h, const struct mp_rect *dst, int flags) { - struct vertex va[4]; + struct vertex va[4] = {0}; struct gl_transform t; gl_transform_ortho(&t, 0, vp_w, 0, vp_h); |