diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 05af11c27e..23c6916253 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -27,6 +27,10 @@ #include "gl.h" #include "gstglupload.h" +#if GST_GL_HAVE_PLATFORM_EGL +#include "egl/gsteglimagememory.h" +#endif + /** * SECTION:gstglupload * @short_description: an object that uploads to GL textures @@ -256,6 +260,12 @@ gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer, return TRUE; } +#if GST_GL_HAVE_PLATFORM_EGL + if (!upload->priv->tex_id && gst_is_egl_image_memory (mem)) + gst_gl_context_gen_texture (upload->context, &upload->priv->tex_id, + GST_VIDEO_FORMAT_RGBA, 0, 0); +#endif + if (!upload->priv->tex_id) gst_gl_context_gen_texture (upload->context, &upload->priv->tex_id, GST_VIDEO_FORMAT_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),