msdk: return a right pointer for VUYA format

The first channel in memory is V for VUYA format, note
GST_VIDEO_FORMAT_VUYA is mapped to MFX_FOURCC_AYUV in this plugin
This commit is contained in:
Haihao Xiang 2019-05-31 14:09:40 +08:00
parent bc0c99a3ab
commit 1ec231b85d

View file

@ -217,7 +217,11 @@ gst_msdk_system_memory_map_full (GstMemory * base_mem, GstMapInfo * info,
return NULL;
}
return mem->surface->Data.Y;
/* The first channel in memory is V for MFX_FOURCC_AYUV (GST_VIDEO_FORMAT_VUYA) format */
if (mem->surface->Info.FourCC == MFX_FOURCC_AYUV)
return mem->surface->Data.V;
else
return mem->surface->Data.Y;
}
static void