From 694e30f858ebddae8c39cf934ff1b21ba7aa08e7 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 30 Nov 2018 17:50:14 +1100 Subject: [PATCH] glformat: return sized formats in from_video_info Fixes green output on e.g. Android when converting between YUV->RGBA --- gst-libs/gst/gl/gstglformat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglformat.c b/gst-libs/gst/gl/gstglformat.c index bc1574377d..ea50a88a8e 100644 --- a/gst-libs/gst/gl/gstglformat.c +++ b/gst-libs/gst/gl/gstglformat.c @@ -197,13 +197,13 @@ gst_gl_format_from_video_info (GstGLContext * context, GstVideoInfo * vinfo, switch (n_plane_components) { case 4: - return GST_GL_RGBA; + return GST_GL_RGBA8; case 3: - return GST_GL_RGB; + return GST_GL_RGB8; case 2: - return texture_rg ? GST_GL_RG : GST_GL_LUMINANCE_ALPHA; + return texture_rg ? GST_GL_RG8 : GST_GL_LUMINANCE_ALPHA; case 1: - return texture_rg ? GST_GL_RED : GST_GL_LUMINANCE; + return texture_rg ? GST_GL_R8 : GST_GL_LUMINANCE; default: break; }