From 487e41b815896ae0cc352fa295b29acb6bea49f2 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 26 Jul 2024 16:10:59 -0400 Subject: [PATCH] glframebuffer: Improve error tracing glCheckFrameStatus() can fail by returning 0, and otherwise return a status. Fix the trace to make it clear when we get an unkown status compare to having an error, in which case we also trace the error code. Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/gstglframebuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglframebuffer.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglframebuffer.c index fc9bcae23b..2743334b47 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglframebuffer.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglframebuffer.c @@ -576,8 +576,14 @@ gst_gl_context_check_framebuffer_status (GstGLContext * context, GST_WARNING_OBJECT (context, "GL_FRAMEBUFFER_UNDEFINED"); break; #endif + case 0: + ret = context->gl_vtable->GetError (); + GST_ERROR_OBJECT (context, + "Error calling glCheckFramebufferStatus(0x%X): %d (0x%X)", + fbo_target, ret, ret); + break; default: - GST_WARNING_OBJECT (context, "Unknown FBO error: %d (0x%x)", ret, ret); + GST_WARNING_OBJECT (context, "Unknown FBO status: %d (0x%X)", ret, ret); break; }