diff options
author | Matthew Waters <ystreet00@gmail.com> | 2014-02-06 21:43:45 +1100 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-02-21 00:37:59 +1100 |
commit | 08e53e971f1818cf4c2dd77cd91a91bc4ebf3075 (patch) | |
tree | c1f0ce813a77ad70984aa836369d8f1ee90be962 | |
parent | 1a8f8ee46ee93387236112bd59fd251e1c1825f9 (diff) |
upload: restore default values for unpack_length
fixes elements that upload a supplementary texture (glbumber,
gldifferencematte, etc)
-rw-r--r-- | gst-libs/gst/gl/gstglupload.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 08493d2..8143a70 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -1518,6 +1518,18 @@ _do_upload_fill (GstGLContext * context, GstGLUpload * upload) tex[i].format, tex[i].type, upload->data[data_i]); } + /* Reset to default values */ +#if GST_GL_HAVE_OPENGL || GST_GL_HAVE_GLES3 + if (USING_OPENGL (context) || USING_GLES3 (context)) { + gl->PixelStorei (GL_UNPACK_ROW_LENGTH, 0); + } +#endif +#if GST_GL_HAVE_GLES2 + if (USING_GLES2 (context)) { + gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4); + } +#endif + /* make sure no texture is in use in our opengl context * in case we want to use the upload texture in an other opengl context */ |