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".
This commit is contained in:
wm4
2012-10-03 03:17:54 +02:00
parent 703e02a6ee
commit bc97dab886
+1 -1
View File
@@ -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) {