mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
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. https://bugzilla.gnome.org/show_bug.cgi?id=793707
This commit is contained in:
parent
faa892fb48
commit
90491d889a
1 changed files with 5 additions and 0 deletions
|
@ -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");
|
||||
return MFX_ERR_LOCK_MEMORY;
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue