Jetpack 5.1.3 xavier agx 16G
when invoke NvBufSurfaceMapEglImage, it got error: nvbufsurface: Failed to create EGLImage.
the fllowing is part to source code:
// dma fd -> EGL image
ret = NvBufSurfaceFromFd(dstNv12Fd, (void **)(&pNvBufSurf));
if (ret != 0 || !pNvBufSurf) {
ret = -6;
algd_trace_goto(CLEANUP, LvErr, "fail to Gets the NvBufSurface from the DMABUF FD.\n");
}
if (pNvBufSurf->surfaceList[0].mappedAddr.eglImage == NULL) {
ret = NvBufSurfaceMapEglImage(pNvBufSurf, 0);
if (ret != 0) {
algd_trace_err("uable to map egl image: %d!\n", ret);
ret = -7;
goto CLEANUP;
}
}