diff options
author | wm4 <wm4@nowhere> | 2017-08-08 13:16:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-08 13:16:37 +0200 |
commit | 0b10a07b6349f77abb7f2a14733c5704664301a1 (patch) | |
tree | 30bc895e2353f82b253ec6114567aa9be53a93c4 /video | |
parent | 3f75b3c3439241c209349908fa190c0382e44f05 (diff) | |
download | mpv-0b10a07b6349f77abb7f2a14733c5704664301a1.tar.bz2 mpv-0b10a07b6349f77abb7f2a14733c5704664301a1.tar.xz |
vo_opengl: don't call glGetProgramBinary if GL_PROGRAM_BINARY_LENGTH==0
Noticed in #4717, although the issue might be about something else.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/ra_gl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c index 6509d9043a..7783baf2f1 100644 --- a/video/out/opengl/ra_gl.c +++ b/video/out/opengl/ra_gl.c @@ -687,8 +687,10 @@ static GLuint load_program(struct ra *ra, const struct ra_renderpass_params *p, uint8_t *buffer = talloc_size(NULL, size + 4); GLsizei actual_size = 0; GLenum binary_format = 0; - gl->GetProgramBinary(prog, size, &actual_size, &binary_format, - buffer + 4); + if (size > 0) { + gl->GetProgramBinary(prog, size, &actual_size, &binary_format, + buffer + 4); + } AV_WL32(buffer, binary_format); if (actual_size) { *out_cached_data = (bstr){buffer, actual_size + 4}; |