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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1199>
This commit is contained in:
Nicolas Dufresne 2021-06-10 12:39:34 -04:00
parent 1565b9635b
commit 0661b15957

View file

@ -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);