msdk: return the right pointer for GST_VIDEO_FORMAT_VUYA frame

The first component for GST_VIDEO_FORMAT_VUYA in memory is V.
This commit is contained in:
Haihao Xiang 2019-03-14 12:05:58 +08:00 committed by Tim-Philipp Müller
parent 24d12a4abf
commit 8389e88840

View file

@ -235,7 +235,11 @@ gst_video_meta_map_msdk_memory (GstVideoMeta * meta, guint plane,
pitch = mem_id->pitch;
#endif
*data = mem->surface->Data.Y + offset;
/* The first channel in memory is V for GST_VIDEO_FORMAT_VUYA */
if (meta->format == GST_VIDEO_FORMAT_VUYA)
*data = mem->surface->Data.V + offset;
else
*data = mem->surface->Data.Y + offset;
*stride = pitch;
info->flags = flags;