From cfae8bd6c10fdf8b5ce368e900b5ed47cdf62381 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 12 Dec 2018 23:25:58 +1100 Subject: [PATCH] glmemory: normalize the internal format we pass into glTex* functions Passing unsized formats sometimes breaks on embedded platforms Take 2 at 694e30f858ebddae8c39cf934ff1b21ba7aa08e7, https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/49 --- gst-libs/gst/gl/gstglmemory.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index 5ef783b56b..ac2878bc35 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -244,6 +244,9 @@ _gl_tex_create (GstGLMemory * gl_mem, GError ** error) internal_format = gl_mem->tex_format; gst_gl_format_type_from_sized_gl_format (internal_format, &tex_format, &tex_type); + internal_format = + gst_gl_sized_gl_format_from_gl_format_type (context, tex_format, + tex_type); if (!gl_mem->texture_wrapped) { gl_mem->tex_id = @@ -769,6 +772,9 @@ _gl_tex_copy_thread (GstGLContext * context, gpointer data) internal_format = copy_params->src->tex_format; gst_gl_format_type_from_sized_gl_format (internal_format, &out_gl_format, &out_gl_type); + internal_format = + gst_gl_sized_gl_format_from_gl_format_type (context, out_gl_format, + out_gl_type); copy_params->tex_id = _new_texture (context, out_tex_target,