summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-12-17 01:00:00 +1100
committerMatthew Waters <matthew@centricular.com>2016-12-17 01:13:44 +1100
commitd8d28e4426009a8d73308ea1869ca5c95ae27c89 (patch)
tree19a56270232d1aa51ec2fe46ff33c7a74049f263
parenta38887375f3631c9198fa328e76a7ae7b28a16c0 (diff)
downloadgstreamer-plugins-bad-d8d28e4426009a8d73308ea1869ca5c95ae27c89.tar.gz
gl/format: use the unsized format for RGB on GLES2
In GLES2 GL_RGB8 doesn't exist so we cannot use it, use GL_RGB instead. https://bugzilla.gnome.org/show_bug.cgi?id=776141
-rw-r--r--gst-libs/gst/gl/gstglformat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstglformat.c b/gst-libs/gst/gl/gstglformat.c
index d64c05d74..ead990b02 100644
--- a/gst-libs/gst/gl/gstglformat.c
+++ b/gst-libs/gst/gl/gstglformat.c
@@ -277,7 +277,8 @@ gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context,
case GST_GL_RGB:
switch (type) {
case GL_UNSIGNED_BYTE:
- return GST_GL_RGB8;
+ return USING_GLES2 (context)
+ && !USING_GLES3 (context) ? GST_GL_RGB : GST_GL_RGB8;
break;
case GL_UNSIGNED_SHORT_5_6_5:
return GST_GL_RGB;