summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-03 02:50:40 +0200
committerwm4 <wm4@nowhere>2012-10-03 03:17:54 +0200
commitbc97dab8860077834d3e0939cf97726366d7d4f5 (patch)
treedcd1a786ca090891848d0b580e54e856cb8aa7cc /libvo
parent703e02a6ee527c248476c05393f063d43cbfae0c (diff)
downloadmpv-bc97dab8860077834d3e0939cf97726366d7d4f5.tar.bz2
mpv-bc97dab8860077834d3e0939cf97726366d7d4f5.tar.xz
vo_opengl: don't try to map an empty buffer
The change detection signalled a full re-upload on initialization, but no texture reallocation. Binding the uninitialized buffer caused an OpenGL error. Fixes error messages on start with "opengl-hq".
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_opengl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c
index 5c3735eebc..a9bd5f67e8 100644
--- a/libvo/vo_opengl.c
+++ b/libvo/vo_opengl.c
@@ -1534,7 +1534,7 @@ static void gen_eosd(struct gl_priv *p, mp_eosd_images_t *imgs)
* sizeof(struct vertex)
* VERTICES_PER_QUAD);
- if (need_upload && p->use_pbo) {
+ if (need_upload && p->use_pbo && p->eosd->targets_count) {
gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, p->eosd_buffer);
char *data = gl->MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);
if (!data) {