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.
This commit is contained in:
Philippe Normand 2019-06-23 11:34:49 +01:00
parent 197dcb9bf4
commit b233911684

View file

@ -702,8 +702,10 @@ _dma_buf_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps,
/* check if one is cached */ /* check if one is cached */
dmabuf->eglimage[i] = _get_cached_eglimage (mems[i], cache_id); 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; continue;
}
/* otherwise create one and cache it */ /* otherwise create one and cache it */
if (dmabuf->direct) if (dmabuf->direct)