mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
gl/memory: RGBA/UNSIGNED_BYTE only format supported by ReadPixels GLES2
Error out in case we attempt to read with any other invalid format.
This commit is contained in:
parent
0c8ccd8c5f
commit
9a0129a0e4
1 changed files with 8 additions and 0 deletions
|
@ -758,6 +758,14 @@ _gl_mem_copy_thread (GstGLContext * context, gpointer data)
|
|||
goto fbo_error;
|
||||
}
|
||||
|
||||
if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2
|
||||
&& (in_gl_format != GL_RGBA || in_gl_type != GL_UNSIGNED_BYTE)) {
|
||||
gst_gl_context_set_error (context, "Cannot copy non RGBA/UNSIGNED_BYTE "
|
||||
"textures on GLES2");
|
||||
gl->BindTexture (GL_TEXTURE_2D, 0);
|
||||
goto fbo_error;
|
||||
}
|
||||
|
||||
if (!src->pbo)
|
||||
gl->GenBuffers (1, &src->pbo);
|
||||
|
||||
|
|
Loading…
Reference in a new issue