Commit 90491d88 authored by Hyunjun Ko's avatar Hyunjun Ko Committed by Sreerenj Balachandran
Browse files

msdk: allocator: libva: check if it's already using dmabuf when mapping

As long as we negotiate the "DMABuf" capsfeatures for now, map can't be
working. So we need to confirm not to do it if using DMABuf memory.
parent faa892fb
......@@ -239,6 +239,11 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
va_surface = mem_id->surface;
dpy = gst_msdk_context_get_handle (context);
if (mem_id->info.mem_type == VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME) {
GST_WARNING ("Couldn't map the buffer since dmabuf is already in use");
if (mem_id->fourcc != MFX_FOURCC_P8) {
va_status = vaDeriveImage (dpy, *va_surface, &mem_id->image);
status = gst_msdk_get_mfx_status_from_va_status (va_status);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment