summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-03-17 22:43:12 +1100
committerMatthew Waters <matthew@centricular.com>2016-03-17 22:56:05 +1100
commita9cf8476ea09b73f3fef44cce66eedeedbf89e16 (patch)
tree3461d3604d7a70f2e327e4b46baf18f703453d0c
parentdf7016553ecdb5bb8fc69c2c5c5b087ea3d2f176 (diff)
downloadgstreamer-plugins-bad-a9cf8476ea09b73f3fef44cce66eedeedbf89e16.tar.gz
glmemory: unset GL_UNPACK_ROW_LENGTH in opengl3
If the user uploads their own texture without setting the unpack length, then then the result will have the appearance of stride mismanagement due to an incorrect row length.
-rw-r--r--gst-libs/gst/gl/gstglmemory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 020bc7ce1..402fd4d44 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -522,7 +522,8 @@ gst_gl_memory_texsubimage (GstGLMemory * gl_mem, gpointer read_pointer)
gst_gl_query_end (GST_GL_BASE_MEMORY_CAST (gl_mem)->query);
/* Reset to default values */
- if (USING_OPENGL (context) || USING_GLES3 (context)) {
+ if (USING_OPENGL (context) || USING_GLES3 (context)
+ || USING_OPENGL3 (context)) {
gl->PixelStorei (GL_UNPACK_ROW_LENGTH, 0);
} else if (USING_GLES2 (context)) {
gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4);