mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 23:13:18 +08:00
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:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user