From 0661b15957ba15126c47c7caf843eefe15bc43c5 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 10 Jun 2021 12:39:34 -0400 Subject: [PATCH] eglimage: Fix wrong stride when importing DMABuf When the code was ported to use component index instead of plane index, the call to GST_VIDEO_INFO_PLANE_STRIDE() was accidently ported to use component index, but this macro takes a plane index. Part-of: --- gst-libs/gst/gl/egl/gsteglimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/gl/egl/gsteglimage.c b/gst-libs/gst/gl/egl/gsteglimage.c index 173f88e8b1..7355d52def 100644 --- a/gst-libs/gst/gl/egl/gsteglimage.c +++ b/gst-libs/gst/gl/egl/gsteglimage.c @@ -599,7 +599,7 @@ gst_egl_image_from_dmabuf (GstGLContext * context, attribs[atti++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT; attribs[atti++] = offset; attribs[atti++] = EGL_DMA_BUF_PLANE0_PITCH_EXT; - attribs[atti++] = GST_VIDEO_INFO_PLANE_STRIDE (in_info, comp[0]); + attribs[atti++] = GST_VIDEO_INFO_PLANE_STRIDE (in_info, plane); attribs[atti] = EGL_NONE; g_assert (atti == G_N_ELEMENTS (attribs) - 1);