From b233911684773f68164493dd48a34016c9b95191 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Sun, 23 Jun 2019 11:34:49 +0100 Subject: [PATCH] glupload: Keep track of cached EGLImage texture format This patch fixes the following critical warning: CRITICAL **: 11:33:32.843: Unknown GL format 0x0 provided It would happen during the setup of a second pipeline involving the DMABuf uploader, typically with a v4l2src element. The warning was raised because the uploader had a cached EGLImage already filled but the formats were not synchronized accordingly. --- gst-libs/gst/gl/gstglupload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index bf6b62d..8849e9d 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -702,8 +702,10 @@ _dma_buf_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps, /* check if one is cached */ dmabuf->eglimage[i] = _get_cached_eglimage (mems[i], cache_id); - if (dmabuf->eglimage[i]) + if (dmabuf->eglimage[i]) { + dmabuf->formats[i] = dmabuf->eglimage[i]->format; continue; + } /* otherwise create one and cache it */ if (dmabuf->direct) -- 2.7.4