summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/gl/gstglmemory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index a4a137233..f811c7347 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -525,10 +525,12 @@ gst_gl_memory_texsubimage (GstGLMemory * gl_mem, gpointer read_pointer)
gl = context->gl_vtable;
gl_type = GL_UNSIGNED_BYTE;
- if (gl_mem->tex_format == GST_GL_RGB565)
+ gl_format = gl_mem->tex_format;
+ if (gl_mem->tex_format == GST_GL_RGB565) {
+ gl_format = GST_GL_RGB;
gl_type = GL_UNSIGNED_SHORT_5_6_5;
+ }
- gl_format = gl_mem->tex_format;
gl_target = gst_gl_texture_target_to_gl (gl_mem->tex_target);
if (USING_OPENGL (context) || USING_GLES3 (context)